4

In my code, I am using idc.GetOpnd(ea,0) and idc.GetOpnd(ea,1) to get the 2 operands of an instruction. However, if its a call (or jmp) instruction, I am getting symbols like _perror and loc_8083BA9.

Using IDAPython, is it possible to remove all the symbols and deal only with memory locations.

3

Use GetOperandValue instead of GetOpnd to get the memory location.

Python>GetOpnd(0xb77a2d99,0)
__Unwind_Resume
Python>'%x'%(GetOperandValue(0xb77a2d99,0))
b76fc24e

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.