Skip to content

Is there a way to get the physical operand size from a ZydisDecodedOperand? #356

Answered by flobernd
jonomango asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

@athre0z is currently working on refactoring the whole .raw stuff. In fact we are trying to remove most of the stuff from ZydisDecodedInstruction and provide a different API to query it. The offsets and sizes to the individual segments (prefixes, imm, disp, ...) will still be available tho and it would be a step in the "wrong direction" to add the raw offset/size to ZydisDecodedOperand.

I'm curious: Is there a particular reason you have to access the raw values in the formatter? Usually the formatter aims to hide any encoding specific details.

To work around your specific problem you could introduce a simple int in your context which you set to 0 when a new instruction is being forma…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@jonomango
Comment options

@flobernd
Comment options

@jonomango
Comment options

@athre0z
Comment options

@jonomango
Comment options

Answer selected by jonomango
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants