regs_mod ¤
Reading register value from the inferior, and provides a standardized interface to registers like "sp" and "pc".
Classes:
Functions:
Attributes:
RegisterManager ¤
Methods:
-
regs_in_frame– -
get_register– -
get_qemu_register– -
read_reg_uncached_in_frame– -
read_reg_uncached– -
read_reg_in_frame–Same as read_reg() except for the provided frame, rather than the currently
-
read_reg–Query the underlying debugger for the value of a register.
-
write_reg– -
__contains__– -
__iter__– -
fix–This is used in CLI parsing.
-
items–
Attributes:
-
previous(dict[str, int | None]) – -
last(dict[str, int | None]) – -
pc(int | None) –Get the value of the program counter register
-
sp(int | None) –Get the value of the stack pointer register
-
current(RegisterSet) – -
gpr(tuple[str, ...]) – -
common(list[str]) – -
frame(str | None) – -
retaddr(tuple[str, ...]) – -
kernel(KernelRegisterSet | None) – -
flags(dict[str, BitFlags]) – -
extra_flags(dict[str, BitFlags]) – -
stack(str) – -
retval(str | None) – -
all(set[str]) – -
reg_sets– -
changed(list[str]) – -
idt(int | None) – -
idt_limit(int | None) – -
fsbase(int) – -
gsbase(int) –
read_reg_in_frame ¤
read_reg_in_frame(reg: str, frame: Frame) -> int | None
Same as read_reg() except for the provided frame, rather than the currently selected frame.
read_reg ¤
Query the underlying debugger for the value of a register.
Note that in some rare cases, debuggers won't directly expose the values of some special model specific registers. Although we can sometimes determine these by other indirect means, this function does not run any extra logic to handle these special cases.
Specifically, if you need to ensure you are reading the correct value of "gs", "fs", "idt", or "idt_limit", use the specific helpers functions on the regs module as necessary to determine the values.
Use read_reg_in_frame() if you have a frame object, its faster.
fix ¤
This is used in CLI parsing. It takes in a string with a register name, "rax", and prefixes it with a $ ("$rax") so that the underlying debugger can evaluate it to resolve the value