howardjack / distorm

Automatically exported from code.google.com/p/distorm
GNU General Public License v3.0
0 stars 0 forks source link

operands not decoded fully, python binding #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
16 bit mode, python binding

if we have something like:
f6 06 b6 7d 01    TEST BYTE [0x7db6], 0x1
everything is fine, but if I would like to build the string myself:

asm.mnemonic + ','.join([str(o) for o in asm.operands])
what I got is TEST [0x7db6], 0x1    'BYTE' is missing

Thanks

Original issue reported on code.google.com by marius.t...@gmail.com on 11 Oct 2014 at 6:01

GoogleCodeExporter commented 9 years ago
Hi Marius,
The way to do it in the Python bindings is to use the 'print inst' (see the 
_toText method).

Since formatting an instruction is way trickier than what you showed, we left 
that part for diStorm library to handle.

If you really want to do it inside Python, you can take a look at the source 
code of distorm.c, or just use dispValue and dispSize and add your own PTR 
prefixes to the operands.

Good luck

Original comment by distorm@gmail.com on 13 Dec 2014 at 10:31