howardjack / distorm

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

operand.type O_PTR/OPERAND_FAR_MEMORY wrong from py #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In what mode did you try to disassemble (16/32/64)?
32

What is the input buffer (binary stream) you used to reproduce the problem?
65.c7.00.0c.00.00.00

What is the expected output (or what instruction)?
MOV DWORD [GS:EAX], 0xc
OP: FarMemory
OP: Immediate

Which tool did you use to see the expected output?
<code>
pc = 0x0808bc4b
text = "65c7000c000000".decode('hex') # MOV DWORD [GS:EAX], 0xc
instruction = Decompose(pc, text, cpu.dmode)[0]
print instruction
for op in instruction.operands:
    print "OP: ", op.type
</code>

What do you see instead?
MOV DWORD [GS:EAX], 0xc
OP:  AbsoluteMemory
OP:  Immediate

What version of diStorm are you using? On what platform 
3-3 linux

Please provide any additional information below.

Original issue reported on code.google.com by felipe.a...@gmail.com on 29 May 2013 at 4:51

GoogleCodeExporter commented 9 years ago
Oops sorry, that is not an issue. The type is okay.

I got confuse because the segment is no reachable from the Operator() class in 
python.
Except maybe for the type FarMemory.

Operators for type O_SMEM, O_MEM, O_DISP should have the segment as a member. 
So one could decide where to read/write using only the Operator object.

Original comment by felipe.a...@gmail.com on 29 May 2013 at 7:37

GoogleCodeExporter commented 9 years ago
I will add it to the Operand class too.
Thanks

Original comment by distorm@gmail.com on 25 Jun 2013 at 8:15

GoogleCodeExporter commented 9 years ago
Added the segment to Operand class too for memory access types.

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