Skip to content

Arch

DEBUG_ENHANCEMENT = False module-attribute

DO_NOT_EMULATE = {CS_GRP_INT, CS_GRP_INVALID, CS_GRP_IRET} module-attribute

access = {v: kfor (k, v) in globals().items() if k.startswith('CS_AC_')} module-attribute

generic_assistant = DisassemblyAssistant(None) module-attribute

groups = {v: kfor (k, v) in globals().items() if k.startswith('CS_GRP_')} module-attribute

ops = {v: kfor (k, v) in globals().items() if k.startswith('CS_OP_')} module-attribute

DisassemblyAssistant

assistants: Dict[str, DisassemblyAssistant] = {} class-attribute instance-attribute

op_handlers: Dict[int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]] = {CS_OP_IMM: self._parse_immediate, CS_OP_REG: self._parse_register, CS_OP_MEM: self._parse_memory} instance-attribute

op_names: Dict[int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]] = {CS_OP_IMM: self._immediate_string, CS_OP_REG: self._register_string, CS_OP_MEM: self._memory_string} instance-attribute

__init__(architecture)

can_reason_about_process_state(instruction)

Determine if the program counter of the process equals the address of the instruction being enhanced. If so, it means we can safely reason and read from registers and memory to enhance values that we can add to the annotation string. This becomes relevent when NOT emulating, and is meant to allow more details when the PC is at the instruction being enhanced

dump(instruction)

Debug-only method.

enhance(instruction, emu=None) staticmethod

for_current_arch() staticmethod

memory_assign(left, right)

memory_or_register_assign(left, right, mem_assign)

Used when we don't know until runtime whether a codepath will annotate a register or memory location.

register_assign(left, right)

syntax_highlight(ins)