2 "Represents a central authority for displaying source code.
4 For example (from test/source-manager/TestSourceManager.py), ::
6 # Create the filespec for 'main.c'.
7 filespec = lldb.SBFileSpec('main.c', False)
8 source_mgr = self.dbg.GetSourceManager()
9 # Use a string stream as the destination.
10 stream = lldb.SBStream()
11 source_mgr.DisplaySourceLinesWithLineNumbers(filespec,
15 '=>', # prefix for current line
19 # 3 int main(int argc, char const *argv[]) {
20 # => 4 printf('Hello world.\\n'); // Set break point at this line.
23 self.expect(stream.GetData(), 'Source code displayed correctly',
25 patterns = ['=> %d.*Hello world' % self.line])"
26 ) lldb
::SBSourceManager
;