[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / lldb / bindings / interface / SBDebuggerExtensions.i
blobff2a0359b1363890c5fc9a59687496f8973eb4ec
1 STRING_EXTENSION_OUTSIDE(SBDebugger)
3 %extend lldb::SBDebugger {
4 #ifdef SWIGPYTHON
5 %pythoncode %{
6 def SetOutputFileHandle(self, file, transfer_ownership):
7 "DEPRECATED, use SetOutputFile"
8 if file is None:
9 import sys
10 file = sys.stdout
11 self.SetOutputFile(SBFile.Create(file, borrow=True))
13 def SetInputFileHandle(self, file, transfer_ownership):
14 "DEPRECATED, use SetInputFile"
15 if file is None:
16 import sys
17 file = sys.stdin
18 self.SetInputFile(SBFile.Create(file, borrow=True))
20 def SetErrorFileHandle(self, file, transfer_ownership):
21 "DEPRECATED, use SetErrorFile"
22 if file is None:
23 import sys
24 file = sys.stderr
25 self.SetErrorFile(SBFile.Create(file, borrow=True))
27 def __iter__(self):
28 '''Iterate over all targets in a lldb.SBDebugger object.'''
29 return lldb_iter(self, 'GetNumTargets', 'GetTargetAtIndex')
31 def __len__(self):
32 '''Return the number of targets in a lldb.SBDebugger object.'''
33 return self.GetNumTargets()
35 #endif
37 lldb::FileSP GetInputFileHandle() {
38 return self->GetInputFile().GetFile();
41 lldb::FileSP GetOutputFileHandle() {
42 return self->GetOutputFile().GetFile();
45 lldb::FileSP GetErrorFileHandle() {
46 return self->GetErrorFile().GetFile();