Reactive la syntaxe Nasm en compilation et ajoute le détail en désassemblage

This commit is contained in:
Horde Nicolas 2021-07-11 18:51:41 +02:00
parent 7c57e86f81
commit cb1cbae9c9
2 changed files with 3 additions and 0 deletions

View File

@ -336,6 +336,7 @@ void Desassembler::Desassemble(uint8_t *content, uint32_t address,uint32_t size,
try try
{ {
srcsize=cs_disasm(handle, content, size, address, 0, &insn); srcsize=cs_disasm(handle, content, size, address, 0, &insn);
cs_option(handle, CS_OPT_DETAIL, CS_OPT_ON);
if (srcsize == 0) if (srcsize == 0)
throw Error("Désassembleur - désassemblage.....................[ERREUR]"); throw Error("Désassembleur - désassemblage.....................[ERREUR]");
else else
@ -384,6 +385,7 @@ Assembler::Assembler(TextWindow *log) : log(log)
{ {
log->append(e.what()); log->append(e.what());
} }
ks_option(ks, KS_OPT_SYNTAX, KS_OPT_SYNTAX_NASM);
} }
std::vector<Code> Assembler::MultiAssemble(std::string source,uint32_t address) std::vector<Code> Assembler::MultiAssemble(std::string source,uint32_t address)

View File

@ -10,6 +10,7 @@
inc dx inc dx
mov esi,0x44440234 mov esi,0x44440234
hlt hlt
jmp 0x14D
.org 0x8D .org 0x8D
mov es,ax mov es,ax
.org 0x14D .org 0x14D