mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
380c5da98e
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.
49 lines
1.5 KiB
OpenEdge ABL
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();
|
|
}
|
|
}
|