45 lines · plain
1%feature("docstring",2"Represents a destination for streaming data output to. By default, a string3stream is created.4 5For example (from test/source-manager/TestSourceManager.py), ::6 7 # Create the filespec for 'main.c'.8 filespec = lldb.SBFileSpec('main.c', False)9 source_mgr = self.dbg.GetSourceManager()10 # Use a string stream as the destination.11 stream = lldb.SBStream()12 source_mgr.DisplaySourceLinesWithLineNumbers(filespec,13 self.line,14 2, # context before15 2, # context after16 '=>', # prefix for current line17 stream)18 19 # 220 # 3 int main(int argc, char const *argv[]) {21 # => 4 printf('Hello world.\\n'); // Set break point at this line.22 # 5 return 0;23 # 6 }24 self.expect(stream.GetData(), 'Source code displayed correctly',25 exe=False,26 patterns = ['=> %d.*Hello world' % self.line])"27) lldb::SBStream;28 29%feature("docstring", "30 If this stream is not redirected to a file, it will maintain a local31 cache for the stream data which can be accessed using this accessor."32) lldb::SBStream::GetData;33 34%feature("docstring", "35 If this stream is not redirected to a file, it will maintain a local36 cache for the stream output whose length can be accessed using this37 accessor."38) lldb::SBStream::GetSize;39 40%feature("docstring", "41 If the stream is redirected to a file, forget about the file and if42 ownership of the file was transferred to this object, close the file.43 If the stream is backed by a local cache, clear this cache."44) lldb::SBStream::Clear;45