1 %feature("docstring",
2 "Represents a central authority for displaying source code.
3 
4 For example (from test/source-manager/TestSourceManager.py), ::
5 
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,
12                                                      self.line,
13                                                      2, # context before
14                                                      2, # context after
15                                                      '=>', # prefix for current line
16                                                      stream)
17 
18         #    2
19         #    3    int main(int argc, char const *argv[]) {
20         # => 4        printf('Hello world.\\n'); // Set break point at this line.
21         #    5        return 0;
22         #    6    }
23         self.expect(stream.GetData(), 'Source code displayed correctly',
24                     exe=False,
25             patterns = ['=> %d.*Hello world' % self.line])"
26 ) lldb::SBSourceManager;
27