Package lldb :: Class SBSymbolContext
[hide private]
[frames] | no frames]

Class SBSymbolContext

source code



A context object that provides access to core debugger entities.

Many debugger functions require a context when doing lookups. This class
provides a common structure that can be used as the result of a query that
can contain a single result.

For example,

        exe = os.path.join(os.getcwd(), 'a.out')

        # Create a target for the debugger.
        target = self.dbg.CreateTarget(exe)

        # Now create a breakpoint on main.c by name 'c'.
        breakpoint = target.BreakpointCreateByName('c', 'a.out')

        # Now launch the process, and do not stop at entry point.
        process = target.LaunchSimple(None, None, os.getcwd())

        # The inferior should stop on 'c'.
        from lldbutil import get_stopped_thread
        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
        frame0 = thread.GetFrameAtIndex(0)

        # Now get the SBSymbolContext from this frame.  We want everything. :-)
        context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)

        # Get the module.
        module = context.GetModule()
        ...

        # And the compile unit associated with the frame.
        compileUnit = context.GetCompileUnit()
        ...

Instance Methods [hide private]
 
__repr__(self) source code
 
__init__(self, *args)
__init__(lldb::SBSymbolContext self) -> SBSymbolContext __init__(lldb::SBSymbolContext self, SBSymbolContext rhs) -> SBSymbolContext
source code
 
IsValid(self)
IsValid(SBSymbolContext self) -> bool
source code
 
__nonzero__(self) source code
 
__bool__(self) source code
 
GetModule(self)
GetModule(SBSymbolContext self) -> SBModule
source code
 
GetCompileUnit(self)
GetCompileUnit(SBSymbolContext self) -> SBCompileUnit
source code
 
GetFunction(self)
GetFunction(SBSymbolContext self) -> SBFunction
source code
 
GetBlock(self)
GetBlock(SBSymbolContext self) -> SBBlock
source code
 
GetLineEntry(self)
GetLineEntry(SBSymbolContext self) -> SBLineEntry
source code
 
GetSymbol(self)
GetSymbol(SBSymbolContext self) -> SBSymbol
source code
 
SetModule(self, *args)
SetModule(SBSymbolContext self, SBModule module)
source code
 
SetCompileUnit(self, *args)
SetCompileUnit(SBSymbolContext self, SBCompileUnit compile_unit)
source code
 
SetFunction(self, *args)
SetFunction(SBSymbolContext self, SBFunction function)
source code
 
SetBlock(self, *args)
SetBlock(SBSymbolContext self, SBBlock block)
source code
 
SetLineEntry(self, *args)
SetLineEntry(SBSymbolContext self, SBLineEntry line_entry)
source code
 
SetSymbol(self, *args)
SetSymbol(SBSymbolContext self, SBSymbol symbol)
source code
 
GetParentOfInlinedScope(self, *args)
GetParentOfInlinedScope(SBSymbolContext self, SBAddress curr_frame_pc, SBAddress parent_frame_addr) -> SBSymbolContext
source code
 
GetDescription(self, *args)
GetDescription(SBSymbolContext self, SBStream description) -> bool
source code
 
__str__(self)
__str__(SBSymbolContext self) -> PyObject *
source code
Class Variables [hide private]
  __swig_setmethods__ = {}
  __setattr__ = lambda self, name, value:
  __swig_getmethods__ = {}
  __getattr__ = lambda self, name:
  __swig_destroy__ = _lldb.delete_SBSymbolContext
  __del__ = lambda self: