diff options
Diffstat (limited to 'courgette/disassembler.cc')
-rw-r--r-- | courgette/disassembler.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/courgette/disassembler.cc b/courgette/disassembler.cc index 798a367..1b7b16e 100644 --- a/courgette/disassembler.cc +++ b/courgette/disassembler.cc @@ -15,13 +15,10 @@ #include "courgette/courgette.h" #include "courgette/disassembler_elf_32_arm.h" #include "courgette/disassembler_elf_32_x86.h" +#include "courgette/disassembler_win32_x64.h" #include "courgette/disassembler_win32_x86.h" #include "courgette/encoded_program.h" -// COURGETTE_HISTOGRAM_TARGETS prints out a histogram of how frequently -// different target addresses are referenced. Purely for debugging. -#define COURGETTE_HISTOGRAM_TARGETS 0 - namespace courgette { //////////////////////////////////////////////////////////////////////////////// @@ -35,6 +32,12 @@ Disassembler* DetectDisassembler(const void* buffer, size_t length) { else delete disassembler; + disassembler = new DisassemblerWin32X64(buffer, length); + if (disassembler->ParseHeader()) + return disassembler; + else + delete disassembler; + disassembler = new DisassemblerElf32X86(buffer, length); if (disassembler->ParseHeader()) return disassembler; |