gdb ¤
Modules:
Classes:
-
GDBRegisters
– -
GDBFrame
– -
GDBThread
– -
GDBMemoryMap
– -
BreakpointAdapter
– -
GDBStopPoint
– -
GDBProcess
– -
GDBExecutionController
– -
GDBCommand
– -
GDBCommandHandle
– -
GDBType
– -
GDBValue
– -
GDB
–
Functions:
-
parse_and_eval
–Same as
gdb.parse_and_eval
, but only usesglobal_context
if it is
Attributes:
-
T
– -
gdb_architecture_name_fixup_list
– -
gdb_mips_to_arch_attribute_map
– -
BPWP_DEFERRED_DELETE
(Set[GDBStopPoint]
) – -
BPWP_DEFERRED_ENABLE
(Set[GDBStopPoint]
) – -
BPWP_DEFERRED_DISABLE
(Set[GDBStopPoint]
) – -
EXECUTION_CONTROLLER
–
gdb_architecture_name_fixup_list module-attribute
¤
gdb_architecture_name_fixup_list = (
"x86-64",
"i386",
"i8086",
"aarch64",
"mips",
"rs6000",
"powerpc",
"sparc",
"arm",
"iwmmxt",
"iwmmxt2",
"xscale",
"riscv:rv32",
"riscv:rv64",
"riscv",
"loongarch64",
"s390:64-bit",
)
gdb_mips_to_arch_attribute_map module-attribute
¤
gdb_mips_to_arch_attribute_map = {
"mips5": MIPS_ISA_5,
"micromips": MIPS_ISA_MICRO,
"isa32": MIPS_ISA_32,
"isa32r2": MIPS_ISA_32R2,
"isa32r3": MIPS_ISA_32R3,
"isa32r5": MIPS_ISA_32R5,
"isa32r6": MIPS_ISA_32R6,
"isa64": MIPS_ISA_64,
"isa64r2": MIPS_ISA_64R2,
"isa64r3": MIPS_ISA_64R3,
"isa64r5": MIPS_ISA_64R5,
"isa64r6": MIPS_ISA_64R6,
}
GDBFrame ¤
GDBThread ¤
BreakpointAdapter ¤
GDBStopPoint ¤
GDBStopPoint(inner: Breakpoint, proc: GDBProcess)
Bases: StopPoint
Methods:
-
set_enabled
– -
remove
– -
__enter__
– -
__exit__
–Automatic breakpoint removal.
Attributes:
-
inner
(Breakpoint
) – -
proc
(GDBProcess
) – -
inner_stop
(Callable[[], bool] | None
) –
GDBProcess ¤
Bases: Process
Methods:
-
threads
– -
pid
– -
alive
– -
stopped_with_signal
– -
evaluate_expression
– -
vmmap
– -
read_memory
– -
write_memory
– -
find_in_memory
– -
is_remote
– -
send_remote
– -
send_monitor
– -
download_remote_file
– -
create_value
– -
symbol_name_at_address
– -
lookup_symbol
– -
types_with_name
– -
arch
– -
break_at
– -
is_linux
– -
disasm
– -
module_section_locations
– -
main_module_name
– -
main_module_entry
– -
is_dynamically_linked
– -
dispatch_execution_controller
–
Attributes:
-
inner
– -
in_bpwp_stop_handler
(bool
) –
find_in_memory ¤
find_in_memory(
pattern: bytearray,
start: int,
size: int,
align: int,
max_matches: int = -1,
step: int = -1,
) -> Generator[int, None, None]
lookup_symbol ¤
lookup_symbol(
name: str,
*,
prefer_static: bool = False,
type: SymbolLookupType = ANY,
objfile_endswith: str | None = None,
) -> Value | None
break_at ¤
break_at(
location: BreakpointLocation | WatchpointLocation,
stop_handler: Callable[[StopPoint], bool] | None = None,
internal: bool = False,
) -> StopPoint
dispatch_execution_controller ¤
dispatch_execution_controller(
procedure: Callable[[ExecutionController], Coroutine[Any, Any, None]],
)
GDBExecutionController ¤
GDBCommand ¤
GDBCommandHandle ¤
GDBType ¤
Bases: Type
Methods:
-
__eq__
– -
func_arguments
– -
fields
– -
has_field
– -
array
– -
pointer
– -
strip_typedefs
– -
target
– -
keys
– -
offsetof
– -
enum_member
–Retrieve the integer value of an enum member.
Attributes:
-
CODE_MAPPING
– -
inner
– -
name_identifier
(str | None
) – -
name_to_human_readable
(str
) – -
sizeof
(int
) – -
alignof
(int
) – -
code
(TypeCode
) –
CODE_MAPPING class-attribute
instance-attribute
¤
CODE_MAPPING = {
TYPE_CODE_BOOL: BOOL,
TYPE_CODE_INT: INT,
TYPE_CODE_UNION: UNION,
TYPE_CODE_STRUCT: STRUCT,
TYPE_CODE_ENUM: ENUM,
TYPE_CODE_TYPEDEF: TYPEDEF,
TYPE_CODE_PTR: POINTER,
TYPE_CODE_ARRAY: ARRAY,
TYPE_CODE_FUNC: FUNC,
TYPE_CODE_METHOD: FUNC,
}
enum_member ¤
Retrieve the integer value of an enum member.
It returns: - integer value, when found field - returns None, If the field does not exist
GDBValue ¤
Bases: Value
Methods:
-
dereference
– -
string
– -
value_to_human_readable
– -
fetch_lazy
– -
__int__
– -
cast
– -
__add__
– -
__sub__
– -
__getitem__
– -
__len__
–
Attributes:
GDB ¤
Bases: Debugger
Methods:
-
setup
– -
add_command
– -
history
– -
lex_args
– -
selected_thread
– -
selected_frame
– -
commands
– -
selected_inferior
– -
is_gdblib_available
– -
has_event_type
– -
event_handler
– -
suspend_events
– -
resume_events
– -
set_sysroot
– -
supports_breakpoint_creation_during_stop_handler
– -
breakpoint_locations
– -
name
– -
x86_disassembly_flavor
– -
string_limit
– -
addrsz
– -
get_cmd_window_size
–Get the size of the command window.
-
set_python_diagnostics
–
Attributes:
-
pre_ctx_lines
(int
) –
add_command ¤
add_command(
name: str, handler: Callable[[Debugger, str, bool], None], doc: str | None
) -> CommandHandle
supports_breakpoint_creation_during_stop_handler ¤
get_cmd_window_size ¤
Get the size of the command window.
GDB keeps these parameters up to date with the actual window size of the command output. This is the full terminal size in CLI mode or the size of the cmd window in TUI mode.
When the window size is set to be unlimited (0), the parameter is None.
parse_and_eval ¤
Same as gdb.parse_and_eval
, but only uses global_context
if it is supported by the current version of GDB.
global_context
was introduced in GDB 14.