GDB (xrefs)
Loading...
Searching...
No Matches
Namespaces | Classes | Functions | Variables
gdb Namespace Reference

Namespaces

namespace  command
 
namespace  dap
 
namespace  disassembler
 
namespace  FrameDecorator
 
namespace  FrameIterator
 
namespace  frames
 
namespace  function
 
namespace  observers
 
namespace  option
 
namespace  printer
 
namespace  printing
 
namespace  prompt
 
namespace  styling
 
namespace  types
 
namespace  unwinder
 
namespace  xmethod
 

Classes

class  _GdbFile
 
struct  bcache
 
struct  bstring
 
struct  reg
 
class  Thread
 

Functions

static void print_percentage (int portion, int total)
 
 _execute_unwinders (pending_frame)
 
 _execute_file (filepath)
 
 _auto_load_packages ()
 
 GdbSetPythonDirectory (dir)
 
 current_progspace ()
 
 objfiles ()
 
 solib_name (addr)
 
 block_for_pc (pc)
 
 find_pc_line (pc)
 
 set_parameter (name, value)
 
 with_parameter (name, value)
 
 blocked_signals ()
 

Variables

 prompt_hook = None
 
 argv
 
list pretty_printers = []
 
list type_printers = []
 
list xmethods = []
 
dict frame_filters = {}
 
list frame_unwinders = []
 
 PYTHONDIR = os.path.dirname(os.path.dirname(__file__))
 
list packages = ["function", "command", "printer"]
 

Function Documentation

◆ _auto_load_packages()

gdb._auto_load_packages ( )
protected

Definition at line 169 of file __init__.py.

References _auto_load_packages().

Referenced by _auto_load_packages(), GdbSetPythonDirectory(), and gdb._GdbFile.write().

◆ _execute_file()

gdb._execute_file ( filepath)
protected
This function is used to replace Python 2's PyRun_SimpleFile.

Loads and executes the given file.

We could use the runpy module, but its documentation says:
"Furthermore, any functions and classes defined by the executed code are
not guaranteed to work correctly after a runpy function has returned."

Definition at line 128 of file __init__.py.

◆ _execute_unwinders()

gdb._execute_unwinders ( pending_frame)
protected
Internal function called from GDB to execute all unwinders.

Runs each currently enabled unwinder until it finds the one that
can unwind given frame.

Arguments:
    pending_frame: gdb.PendingFrame instance.

Returns:
    Tuple with:

      [0] gdb.UnwindInfo instance
      [1] Name of unwinder that claimed the frame (type `str`)

    or None, if no unwinder has claimed the frame.

Definition at line 89 of file __init__.py.

References current_progspace(), and objfiles().

◆ block_for_pc()

gdb.block_for_pc ( pc)

Definition at line 227 of file __init__.py.

References block_for_pc(), and current_progspace().

Referenced by block_for_pc(), and gdb._GdbFile.write().

◆ blocked_signals()

gdb.blocked_signals ( )
A helper function that blocks and unblocks signals.

Definition at line 267 of file __init__.py.

Referenced by gdb.Thread.start().

◆ current_progspace()

gdb.current_progspace ( )

◆ find_pc_line()

gdb.find_pc_line ( pc)
find_pc_line (pc) -> Symtab_and_line.
Return the gdb.Symtab_and_line object corresponding to the pc value.

Definition at line 232 of file __init__.py.

References current_progspace(), and find_pc_line().

Referenced by find_pc_line(), and gdb._GdbFile.write().

◆ GdbSetPythonDirectory()

gdb.GdbSetPythonDirectory ( dir)
Update sys.path, reload gdb and auto-load packages.

Definition at line 193 of file __init__.py.

References _auto_load_packages().

◆ objfiles()

gdb.objfiles ( )

◆ print_percentage()

static void gdb::print_percentage ( int portion,
int total )
static

Definition at line 244 of file bcache.c.

References gdb_printf().

Referenced by gdb::bcache::print_statistics().

◆ set_parameter()

gdb.set_parameter ( name,
value )
Set the GDB parameter NAME to VALUE.

Definition at line 238 of file __init__.py.

Referenced by with_parameter(), and gdb._GdbFile.write().

◆ solib_name()

gdb.solib_name ( addr)
solib_name (Long) -> String.\n\
Return the name of the shared library holding a given address, or None.

Definition at line 221 of file __init__.py.

References current_progspace(), and solib_name().

Referenced by gdb.FrameDecorator.FrameDecorator.filename(), solib_name(), and gdb._GdbFile.write().

◆ with_parameter()

gdb.with_parameter ( name,
value )
Temporarily set the GDB parameter NAME to VALUE.
Note that this is a context manager.

Definition at line 254 of file __init__.py.

References set_parameter().

Referenced by gdb.dap.evaluate.EvaluateResult.__init__(), gdb.dap.evaluate._eval_for_hover(), and gdb.dap.varref.apply_format().

Variable Documentation

◆ argv

gdb.argv

Definition at line 74 of file __init__.py.

◆ frame_filters

dict gdb.frame_filters = {}

Definition at line 84 of file __init__.py.

◆ frame_unwinders

list gdb.frame_unwinders = []

Definition at line 86 of file __init__.py.

◆ packages

list gdb.packages = ["function", "command", "printer"]

Definition at line 162 of file __init__.py.

◆ pretty_printers

list gdb.pretty_printers = []

Definition at line 77 of file __init__.py.

◆ prompt_hook

gdb.prompt_hook = None

Definition at line 70 of file __init__.py.

◆ PYTHONDIR

gdb.PYTHONDIR = os.path.dirname(os.path.dirname(__file__))

Definition at line 156 of file __init__.py.

◆ type_printers

list gdb.type_printers = []

Definition at line 80 of file __init__.py.

◆ xmethods

list gdb.xmethods = []

Definition at line 82 of file __init__.py.