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

Class SBSourceManager

source code



    Represents a central authority for displaying source code.

    For example (from test/source-manager/TestSourceManager.py),

            # Create the filespec for 'main.c'.
            filespec = lldb.SBFileSpec('main.c', False)
            source_mgr = self.dbg.GetSourceManager()
            # Use a string stream as the destination.
            stream = lldb.SBStream()
            source_mgr.DisplaySourceLinesWithLineNumbers(filespec,
                                                         self.line,
                                                         2, # context before
                                                         2, # context after
                                                         '=>', # prefix for current line
                                                         stream)

            #    2    
            #    3    int main(int argc, char const *argv[]) {
            # => 4        printf('Hello world.
'); // Set break point at this line.
            #    5        return 0;
            #    6    }
            self.expect(stream.GetData(), 'Source code displayed correctly',
                        exe=False,
                patterns = ['=> %d.*Hello world' % self.line])

    

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::SBSourceManager self, SBSourceManager rhs) -> SBSourceManager
source code
 
__swig_destroy__(...)
delete_SBSourceManager(SBSourceManager self)
 
__del__(self) source code
 
DisplaySourceLinesWithLineNumbers(self, *args)
DisplaySourceLinesWithLineNumbers(SBSourceManager self, SBFileSpec file, uint32_t line, uint32_t context_before, uint32_t context_after, ...
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __swig_setmethods__ = {}
  __swig_getmethods__ = {}
Properties [hide private]

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::SBSourceManager self, SBSourceManager rhs) -> SBSourceManager

Overrides: object.__init__

DisplaySourceLinesWithLineNumbers(self, *args)

source code 

DisplaySourceLinesWithLineNumbers(SBSourceManager self, SBFileSpec file, uint32_t line, uint32_t context_before, uint32_t context_after, 
    str const * current_line_cstr, SBStream s) -> size_t