[CodeGenPrepare] Drop nsw flags in `optimizeLoadExt` (#118180)
[llvm-project.git] / lldb / bindings / interface / SBSourceManagerDocstrings.i
blob0f089941787ffe4679b41557190cbcb58ca4ad89
1 %feature("docstring",
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,
12 self.line,
13 2, # context before
14 2, # context after
15 '=>', # prefix for current line
16 stream)
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;