lldb.SBSymbolContext

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

# Class SBSymbolContext

source code

    A context object that provides access to core debugger entities.

    Manay 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]
__setattr__(self, name, value) x.__setattr__('name', value) <==> x.name = value | source code
__getattr__(self, name) | source code
__repr__(self) repr(x) | source code
__init__(self, *args) __init__(lldb::SBSymbolContext self) -> SBSymbolContext __init__(lldb::SBSymbolContext self, SBSymbolContext rhs) -> SBSymbolContext | source code
__swig_destroy__(...) delete_SBSymbolContext(SBSymbolContext self) |
__del__(self) | source code
__nonzero__(self) | source code
IsValid(self) IsValid(SBSymbolContext self) -> bool | 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
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]
| __swig_setmethods__ = `{}`
| __swig_getmethods__ = `{}`

Properties | [hide private]
| block A read/write property that allows the getting/setting of the block (lldb.SBBlock) in this symbol context.
| compile_unit A read/write property that allows the getting/setting of the compile unit (lldb.SBCompileUnit) in this symbol context.
| function A read/write property that allows the getting/setting of the function (lldb.SBFunction) in this symbol context.
| line_entry A read/write property that allows the getting/setting of the line entry (lldb.SBLineEntry) in this symbol context.
| module A read/write property that allows the getting/setting of the module (lldb.SBModule) in this symbol context.
| symbol A read/write property that allows the getting/setting of the symbol (lldb.SBSymbol) in this symbol context.
Inherited from `object`: `__class__`

Method Details | [hide private]

### __setattr__(self, name, value) | source code
x.__setattr__('name', value) <==> x.name = value Overrides: object.__setattr__ (inherited documentation)

### __repr__(self) (Representation operator) | source code
repr(x) Overrides: object.__repr__ (inherited documentation)

### __init__(self, *args) (Constructor) | source code
__init__(lldb::SBSymbolContext self) -> SBSymbolContext __init__(lldb::SBSymbolContext self, SBSymbolContext rhs) -> SBSymbolContext Overrides: object.__init__

### __str__(self) (Informal representation operator) | source code
__str__(SBSymbolContext self) -> PyObject * Overrides: object.__str__

Property Details | [hide private]

### block A read/write property that allows the getting/setting of the block (lldb.SBBlock) in this symbol context. Get Method: GetBlock(self) - GetBlock(SBSymbolContext self) -> SBBlock Set Method: SetBlock(self, *args) - SetBlock(SBSymbolContext self, SBBlock block)

### compile_unit A read/write property that allows the getting/setting of the compile unit (lldb.SBCompileUnit) in this symbol context. Get Method: GetCompileUnit(self) - GetCompileUnit(SBSymbolContext self) -> SBCompileUnit Set Method: SetCompileUnit(self, *args) - SetCompileUnit(SBSymbolContext self, SBCompileUnit compile_unit)

### function A read/write property that allows the getting/setting of the function (lldb.SBFunction) in this symbol context. Get Method: GetFunction(self) - GetFunction(SBSymbolContext self) -> SBFunction Set Method: SetFunction(self, *args) - SetFunction(SBSymbolContext self, SBFunction function)

### line_entry A read/write property that allows the getting/setting of the line entry (lldb.SBLineEntry) in this symbol context. Get Method: GetLineEntry(self) - GetLineEntry(SBSymbolContext self) -> SBLineEntry Set Method: SetLineEntry(self, *args) - SetLineEntry(SBSymbolContext self, SBLineEntry line_entry)

### module A read/write property that allows the getting/setting of the module (lldb.SBModule) in this symbol context. Get Method: GetModule(self) - GetModule(SBSymbolContext self) -> SBModule Set Method: SetModule(self, *args) - SetModule(SBSymbolContext self, SBModule module)

### symbol A read/write property that allows the getting/setting of the symbol (lldb.SBSymbol) in this symbol context. Get Method: GetSymbol(self) - GetSymbol(SBSymbolContext self) -> SBSymbol Set Method: SetSymbol(self, *args) - SetSymbol(SBSymbolContext self, SBSymbol symbol)