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

Namespaces

namespace  command
 
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
 

Functions

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

Variables

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

Function Documentation

◆ _auto_load_packages()

def gdb._auto_load_packages ( )
protected

Definition at line 167 of file __init__.py.

References _auto_load_packages().

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

◆ _execute_file()

def 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 126 of file __init__.py.

◆ _execute_unwinders()

def 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 87 of file __init__.py.

References current_progspace(), and objfiles().

◆ block_for_pc()

def gdb.block_for_pc (   pc)

Definition at line 225 of file __init__.py.

References block_for_pc(), and current_progspace().

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

◆ current_progspace()

def gdb.current_progspace ( )

◆ find_pc_line()

def 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 230 of file __init__.py.

References current_progspace(), and find_pc_line().

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

◆ GdbSetPythonDirectory()

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

Definition at line 191 of file __init__.py.

References _auto_load_packages().

◆ objfiles()

def 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()

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

Definition at line 236 of file __init__.py.

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

◆ solib_name()

def 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 219 of file __init__.py.

References current_progspace(), and solib_name().

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

◆ with_parameter()

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

Definition at line 252 of file __init__.py.

References set_parameter().

Variable Documentation

◆ argv

gdb.argv

Definition at line 72 of file __init__.py.

◆ else

gdb.else :

Definition at line 25 of file __init__.py.

◆ frame_filters

dict gdb.frame_filters = {}

Definition at line 82 of file __init__.py.

◆ frame_unwinders

list gdb.frame_unwinders = []

Definition at line 84 of file __init__.py.

◆ packages

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

Definition at line 160 of file __init__.py.

◆ pretty_printers

list gdb.pretty_printers = []

Definition at line 75 of file __init__.py.

◆ prompt_hook

None gdb.prompt_hook = None

Definition at line 68 of file __init__.py.

◆ PYTHONDIR

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

Definition at line 154 of file __init__.py.

◆ type_printers

list gdb.type_printers = []

Definition at line 78 of file __init__.py.

◆ xmethods

list gdb.xmethods = []

Definition at line 80 of file __init__.py.