Re-land "[lldb/docs] Silence warnings when generating website"

This reverts commit 18f1c1ace7 and fix the
build failure issues introduced because of the `STRING_EXTENSION_OUTSIDE`
swig macros.

Differential Revision: https://reviews.llvm.org/D159017

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
This commit is contained in:
Med Ismail Bennani
2023-08-29 16:22:55 +01:00
parent ad778a8a0f
commit f0731d5b61
81 changed files with 1756 additions and 89 deletions

View File

@@ -7,6 +7,12 @@ STRING_EXTENSION_OUTSIDE(SBAddress)
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __len__(self):
pass
def __iter__(self):
pass
%}
%pythoncode %{

View File

@@ -0,0 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBAttachInfo)
%extend lldb::SBAttachInfo {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -3,6 +3,21 @@ STRING_EXTENSION_OUTSIDE(SBBlock)
%extend lldb::SBBlock {
#ifdef SWIGPYTHON
%pythoncode %{
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
def get_range_at_index(self, idx):
if idx < self.GetNumRanges():
return [self.GetRangeStartAddress(idx), self.GetRangeEndAddress(idx)]

View File

@@ -44,6 +44,15 @@ STRING_EXTENSION_OUTSIDE(SBBreakpoint)
object.'''
return self.GetNumLocations()
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
locations = property(get_breakpoint_location_list, None, doc='''A read only property that returns a list() of lldb.SBBreakpointLocation objects for this breakpoint.''')
location = property(get_locations_access_object, None, doc='''A read only property that returns an object that can access locations by index (not location ID) (location = bkpt.location[12]).''')
id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''')

View File

@@ -0,0 +1,29 @@
STRING_EXTENSION_OUTSIDE(SBBreakpointList)
%extend lldb::SBBreakpointList {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
'''Return the number of breakpoints in a lldb.SBBreakpointList object.'''
return self.GetSize()
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
'''Iterate over all breakpoints in a lldb.SBBreakpointList object.'''
return lldb_iter(self, 'GetSize', 'GetBreakpointAtIndex')
%}
#endif
}

View File

@@ -1 +1,27 @@
STRING_EXTENSION_LEVEL_OUTSIDE(SBBreakpointLocation, lldb::eDescriptionLevelFull)
%extend lldb::SBBreakpointLocation {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -1 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBBreakpointName)
%extend lldb::SBBreakpointName {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -0,0 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBBroadcaster)
%extend lldb::SBBroadcaster {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -0,0 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBCommandInterpreter)
%extend lldb::SBCommandInterpreter {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -0,0 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBCommandInterpreterRunOptions)
%extend lldb::SBCommandInterpreterRunOptions {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -1,6 +1,30 @@
STRING_EXTENSION_OUTSIDE(SBCommandReturnObject)
%extend lldb::SBCommandReturnObject {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
// transfer_ownership does nothing, and is here for compatibility with
// old scripts. Ownership is tracked by reference count in the ordinary way.

View File

@@ -0,0 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBCommunication)
%extend lldb::SBCommunication {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __len__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -3,6 +3,15 @@ STRING_EXTENSION_OUTSIDE(SBCompileUnit)
%extend lldb::SBCompileUnit {
#ifdef SWIGPYTHON
%pythoncode %{
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
'''Iterate over all line entries in a lldb.SBCompileUnit object.'''
return lldb_iter(self, 'GetNumLineEntries', 'GetLineEntryAtIndex')

View File

@@ -3,6 +3,23 @@ STRING_EXTENSION_OUTSIDE(SBData)
%extend lldb::SBData {
#ifdef SWIGPYTHON
%pythoncode %{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __len__(self):
return self.GetByteSize()
def __iter__(self):
pass
class read_data_helper:
def __init__(self, sbdata, readerfunc, item_size):

View File

@@ -24,6 +24,15 @@ STRING_EXTENSION_OUTSIDE(SBDebugger)
file = sys.stderr
self.SetErrorFile(SBFile.Create(file, borrow=True))
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __iter__(self):
'''Iterate over all targets in a lldb.SBDebugger object.'''
return lldb_iter(self, 'GetNumTargets', 'GetTargetAtIndex')

View File

@@ -3,6 +3,21 @@ STRING_EXTENSION_OUTSIDE(SBDeclaration)
%extend lldb::SBDeclaration {
#ifdef SWIGPYTHON
%pythoncode %{
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __len__(self):
pass
def __iter__(self):
pass
file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
line = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')

View File

@@ -0,0 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBEnvironment)
%extend lldb::SBEnvironment {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __len__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -3,6 +3,24 @@ STRING_EXTENSION_OUTSIDE(SBError)
%extend lldb::SBError {
#ifdef SWIGPYTHON
%pythoncode %{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
return self.GetError()
def __hex__(self):
return self.GetError()
def __oct__(self):
return self.GetError()
def __len__(self):
pass
def __iter__(self):
pass
value = property(GetError, None, doc='''A read only property that returns the same result as GetError().''')
fail = property(Fail, None, doc='''A read only property that returns the same result as Fail().''')
success = property(Success, None, doc='''A read only property that returns the same result as Success().''')

View File

@@ -0,0 +1,27 @@
STRING_EXTENSION_OUTSIDE(SBEvent)
%extend lldb::SBEvent {
#ifdef SWIGPYTHON
// operator== is a free function, which swig does not handle, so we inject
// our own equality operator here
%pythoncode%{
def __eq__(self, other):
return not self.__ne__(other)
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __len__(self):
pass
def __iter__(self):
pass
%}
#endif
}

View File

@@ -1,6 +1,21 @@
%extend lldb::SBExecutionContext {
#ifdef SWIGPYTHON
%pythoncode %{
def __int__(self):
pass
def __hex__(self):
pass
def __oct__(self):
pass
def __len__(self):
pass
def __iter__(self):
pass
target = property(GetTarget, None, doc='''A read only property that returns the same result as GetTarget().''')
process = property(GetProcess, None, doc='''A read only property that returns the same result as GetProcess().''')
thread = property(GetThread, None, doc='''A read only property that returns the same result as GetThread().''')

Some files were not shown because too many files have changed in this diff Show More