llvm-capstone/lldb/bindings/interface/SBDebuggerExtensions.i
Med Ismail Bennani 380c5da98e Revert "Re-land "[lldb/docs] Silence warnings when generating website""
This reverts 3 commit:
- f0731d5b61.
- 8e0a087571.
- f2f5d6fb8d.

This changes were introduced to silence the warnings that are printed
when generating the lldb module documentation for the website but it
changed the python bindings and causes test failures on the macos bot:

https://green.lab.llvm.org/green/job/lldb-cmake/59438/

We will have to consider other options to silence these warnings.
2023-08-31 16:31:10 +01:00

49 lines
1.5 KiB
OpenEdge ABL

STRING_EXTENSION_OUTSIDE(SBDebugger)
%extend lldb::SBDebugger {
#ifdef SWIGPYTHON
%pythoncode %{
def SetOutputFileHandle(self, file, transfer_ownership):
"DEPRECATED, use SetOutputFile"
if file is None:
import sys
file = sys.stdout
self.SetOutputFile(SBFile.Create(file, borrow=True))
def SetInputFileHandle(self, file, transfer_ownership):
"DEPRECATED, use SetInputFile"
if file is None:
import sys
file = sys.stdin
self.SetInputFile(SBFile.Create(file, borrow=True))
def SetErrorFileHandle(self, file, transfer_ownership):
"DEPRECATED, use SetErrorFile"
if file is None:
import sys
file = sys.stderr
self.SetErrorFile(SBFile.Create(file, borrow=True))
def __iter__(self):
'''Iterate over all targets in a lldb.SBDebugger object.'''
return lldb_iter(self, 'GetNumTargets', 'GetTargetAtIndex')
def __len__(self):
'''Return the number of targets in a lldb.SBDebugger object.'''
return self.GetNumTargets()
%}
#endif
lldb::FileSP GetInputFileHandle() {
return self->GetInputFile().GetFile();
}
lldb::FileSP GetOutputFileHandle() {
return self->GetOutputFile().GetFile();
}
lldb::FileSP GetErrorFileHandle() {
return self->GetErrorFile().GetFile();
}
}