2 "Represents a destination for streaming data output to. By default, a string
5 For example (from test/source-manager/TestSourceManager.py), ::
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,
16 '=>', # prefix for current line
20 # 3 int main(int argc, char const *argv[]) {
21 # => 4 printf('Hello world.\\n'); // Set break point at this line.
24 self.expect(stream.GetData(), 'Source code displayed correctly',
26 patterns = ['=> %d.*Hello world' % self.line])"
29 %feature
("docstring", "
30 If this stream is not redirected to a file, it will maintain a local
31 cache for the stream data which can be accessed using this accessor."
32 ) lldb
::SBStream
::GetData
;
34 %feature
("docstring", "
35 If this stream is not redirected to a file, it will maintain a local
36 cache for the stream output whose length can be accessed using this
38 ) lldb
::SBStream
::GetSize
;
40 %feature
("docstring", "
41 If the stream is redirected to a file, forget about the file and if
42 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
;