Skip to content

Is there a way to query modrm presence? #742

@dbalsom

Description

@dbalsom

Thanks for the great crate -

Quick question, because I've searched the docs and come up blank.

Is there a way to query if an instruction has a modrm byte? Maybe I'm missing a simple way to do it.

I've currently got a kludgy workaround looking at the disassembled string for brackets, but surely...

I think the simplest thing would be adding 'has_modrm' and 'has_sib' on Instruction.

Or maybe get_address_offsets on Decoder, like we have get_constant_offsets, could return an AddressOffsets that has the offset of the modrm byte, sib byte, and displacement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions