explicit operator bool() const;
+#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)
%}
+#endif
bool operator!=(const SBAddress &rhs) const;
lldb::SBLineEntry
GetLineEntry ();
+#ifdef SWIGPYTHON
%pythoncode %{
def __get_load_addr_property__ (self):
'''Get the load address for a lldb.SBAddress using the current target.'''
file_addr = property(GetFileAddress, None, doc='''A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.''')
load_addr = property(__get_load_addr_property__, __set_load_addr_property__, doc='''A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target so this property can ONLY be used in the interactive script interpreter (i.e. under the lldb script command) and not in Python based commands, or breakpoint commands.''')
%}
+#endif
};
bool locals,
bool statics);
+#ifdef SWIGPYTHON
%pythoncode %{
def get_range_at_index(self, idx):
if idx < self.GetNumRanges():
ranges = property(get_ranges_array, None, doc='''A read only property that returns a list() object that contains all of the address ranges for the block.''')
num_ranges = property(GetNumRanges, None, doc='''A read only property that returns the same result as GetNumRanges().''')
%}
+#endif
};
bool
IsHardware ();
+#ifdef SWIGPYTHON
%pythoncode %{
class locations_access(object):
one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.''')
num_locations = property(GetNumLocations, None, doc='''A read only property that returns the count of locations of this breakpoint.''')
%}
+#endif
};
bool
operator != (const lldb::SBCompileUnit &rhs) const;
+#ifdef SWIGPYTHON
%pythoncode %{
def __iter__(self):
'''Iterate over all line entries in a lldb.SBCompileUnit object.'''
file = property(GetFileSpec, None, doc='''A read only property that returns the same result an lldb object that represents the source file (lldb.SBFileSpec) for the compile unit.''')
num_line_entries = property(GetNumLineEntries, None, doc='''A read only property that returns the number of line entries in a compile unit as an integer.''')
%}
+#endif
};
} // namespace lldb
bool
SetDataFromDoubleArray (double* array, size_t array_len);
+#ifdef SWIGPYTHON
%pythoncode %{
class read_data_helper:
byte_order = property(GetByteOrder, SetByteOrder, doc='''A read/write property getting and setting the endianness of this SBData (data.byte_order = lldb.eByteOrderLittle).''')
size = property(GetByteSize, None, doc='''A read only property that returns the size the same result as GetByteSize().''')
%}
+#endif
};
void
SkipLLDBInitFiles (bool b);
+#ifdef SWIGPYTHON
%pythoncode %{
def SetOutputFileHandle(self, file, transfer_ownership):
"DEPRECATED, use SetOutputFile"
file = sys.stderr
self.SetErrorFile(SBFile.Create(file, borrow=True))
%}
+#endif
%extend {
lldb::SBError
RunREPL (lldb::LanguageType language, const char *repl_options);
+#ifdef SWIGPYTHON
%pythoncode%{
def __iter__(self):
'''Iterate over all targets in a lldb.SBDebugger object.'''
'''Return the number of targets in a lldb.SBDebugger object.'''
return self.GetNumTargets()
%}
+#endif
}; // class SBDebugger
bool
operator != (const lldb::SBDeclaration &rhs) const;
+#ifdef SWIGPYTHON
%pythoncode %{
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.''')
%}
+#endif
};
} // namespace lldb
bool
GetDescription (lldb::SBStream &description);
+#ifdef SWIGPYTHON
%pythoncode %{
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().''')
description = property(GetCString, None, doc='''A read only property that returns the same result as GetCString().''')
type = property(GetType, None, doc='''A read only property that returns the same result as GetType().''')
%}
+#endif
};
SBFrame
GetFrame () const;
+#ifdef SWIGPYTHON
%pythoncode %{
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().''')
frame = property(GetFrame, None, doc='''A read only property that returns the same result as GetFrame().''')
%}
+#endif
};
}
}
+#ifdef SWIGPYTHON
%pythoncode {
@classmethod
def Create(cls, file, borrow=False, force_io_methods=False):
else:
return cls(file)
}
+#endif
~SBFile ();
void
AppendPathComponent (const char *file_or_directory);
+#ifdef SWIGPYTHON
%pythoncode %{
def __get_fullpath__(self):
spec_dir = self.GetDirectory()
dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''')
exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''')
%}
+#endif
};
bool
GetDescription (lldb::SBStream &description);
+#ifdef SWIGPYTHON
%pythoncode %{
def get_all_variables(self):
return self.GetVariables(True,True,True,True)
reg = property(get_registers_access, None, doc='''A read only property that returns an helper object providing a flattened indexable view of the CPU registers for this stack frame''')
parent = property(get_parent_frame, None, doc='''A read only property that returns the parent (caller) frame of the current frame.''')
%}
+#endif
};
} // namespace lldb
bool
operator != (const lldb::SBFunction &rhs) const;
+#ifdef SWIGPYTHON
%pythoncode %{
def get_instructions_from_current_target (self):
return self.GetInstructions (target)
prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the return type (lldb.SBType) for this function.''')
%}
+#endif
};
bool
TestEmulation (lldb::SBStream &output_stream, const char *test_file);
+#ifdef SWIGPYTHON
%pythoncode %{
def __mnemonic_property__ (self):
return self.GetMnemonic (target)
size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')
%}
+#endif
};
bool
DumpEmulationForAllInstructions (const char *triple);
+#ifdef SWIGPYTHON
%pythoncode %{
def __iter__(self):
'''Iterate over all instructions in a lldb.SBInstructionList
closest_inst = inst
return None
%}
+#endif
};
bool
operator != (const lldb::SBLineEntry &rhs) const;
+#ifdef SWIGPYTHON
%pythoncode %{
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.''')
addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this line entry.''')
end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this line entry.''')
%}
+#endif
};
} // namespace lldb
namespace lldb {
+#ifdef SWIGPYTHON
%pythoncode%{
# ==================================
# Helper function for SBModule class
else:
return False
%}
+#endif
%feature("docstring",
"Represents an executable image and its associated object and symbol files.
lldb::SBAddress
GetObjectFileEntryPointAddress() const;
+#ifdef SWIGPYTHON
%pythoncode %{
def __len__(self):
'''Return the number of symbols in a lldb.SBModule object.'''
num_sections = property(GetNumSections, None, doc='''A read only property that returns number of sections in the module as an integer.''')
%}
+#endif
};
lldb::SBProcessInfo
GetProcessInfo();
+#ifdef SWIGPYTHON
%pythoncode %{
def __get_is_alive__(self):
'''Returns "True" if the process is currently alive, "False" otherwise'''
exit_description = property(GetExitDescription, None, doc='''A read only property that returns an exit description as a string of this process when the process state is lldb.eStateExited.''')
broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this process.''')
%}
+#endif
};
bool
operator != (const lldb::SBSection &rhs);
+#ifdef SWIGPYTHON
%pythoncode %{
def __iter__(self):
'''Iterate over all subsections in a lldb.SBSection object.'''
type = property(GetSectionType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSectionType") that represents the type of this section (code, data, etc.).''')
target_byte_size = property(GetTargetByteSize, None, doc='''A read only property that returns the size of a target byte represented by this section as a number of host bytes.''')
%}
+#endif
private:
void
Clear ();
+#ifdef SWIGPYTHON
%pythoncode%{
def __iter__(self):
'''Iterate over all strings in a lldb.SBStringList object.'''
'''Return the number of strings in a lldb.SBStringList object.'''
return self.GetSize()
%}
+#endif
};
} // namespace lldb
bool
operator != (const lldb::SBSymbol &rhs) const;
+#ifdef SWIGPYTHON
%pythoncode %{
def get_instructions_from_current_target (self):
return self.GetInstructions (target)
external = property(IsExternal, None, doc='''A read only property that returns a boolean value that indicates if this symbol is externally visiable (exported) from the module that contains it.''')
synthetic = property(IsSynthetic, None, doc='''A read only property that returns a boolean value that indicates if this symbol was synthetically created from information in module that contains it.''')
%}
+#endif
};
GetDescription (lldb::SBStream &description);
+#ifdef SWIGPYTHON
%pythoncode %{
module = property(GetModule, SetModule, doc='''A read/write property that allows the getting/setting of the module (lldb.SBModule) in this symbol context.''')
compile_unit = property(GetCompileUnit, SetCompileUnit, doc='''A read/write property that allows the getting/setting of the compile unit (lldb.SBCompileUnit) in this symbol context.''')
symbol = property(GetSymbol, SetSymbol, doc='''A read/write property that allows the getting/setting of the symbol (lldb.SBSymbol) in this symbol context.''')
line_entry = property(GetLineEntry, SetLineEntry, doc='''A read/write property that allows the getting/setting of the line entry (lldb.SBLineEntry) in this symbol context.''')
%}
+#endif
};
void
Clear();
+#ifdef SWIGPYTHON
%pythoncode %{
def __iter__(self):
'''Iterate over all symbol contexts in a lldb.SBSymbolContextList
line_entries = property(get_line_entry_array, None, doc='''Returns a list() of lldb.SBLineEntry objects, one for each line entry in each SBSymbolContext object in this list.''')
symbols = property(get_symbol_array, None, doc='''Returns a list() of lldb.SBSymbol objects, one for each symbol in each SBSymbolContext object in this list.''')
%}
+#endif
};
lldb::SBValue
EvaluateExpression (const char *expr, const lldb::SBExpressionOptions &options);
+#ifdef SWIGPYTHON
%pythoncode %{
class modules_access(object):
'''A helper object that will lazily hand out lldb.SBModule objects for a target when supplied an index, or by full or partial path.'''
code_byte_size = property(GetCodeByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the code address space for this target.''')
platform = property(GetPlatform, None, doc='''A read only property that returns the platform associated with with this target.''')
%}
+#endif
};
} // namespace lldb
bool
SafeToCallFunctions ();
+#ifdef SWIGPYTHON
%pythoncode %{
def __iter__(self):
'''Iterate over all frames in a lldb.SBThread object.'''
is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''')
is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''')
%}
+#endif
};
uint32_t
GetBitfieldSizeInBits();
+#ifdef SWIGPYTHON
%pythoncode %{
name = property(GetName, None, doc='''A read only property that returns the name for this member as a string.''')
type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this member.''')
is_bitfield = property(IsBitfield, None, doc='''A read only property that returns true if this member is a bitfield.''')
bitfield_bit_size = property(GetBitfieldSizeInBits, None, doc='''A read only property that returns the bitfield size in bits for this member as an integer, or zero if this member is not a bitfield.''')
%}
+#endif
protected:
std::unique_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
bool operator!=(lldb::SBType &rhs);
+#ifdef SWIGPYTHON
%pythoncode %{
def template_arg_array(self):
num_args = self.num_template_args
members = property(get_members_array, None, doc='''A read only property that returns a list() of all lldb.SBTypeMember objects that represent all of the base classes, virtual base classes and fields for this type in ascending bit offset order.''')
enum_members = property(get_enum_members_array, None, doc='''A read only property that returns a list() of all lldb.SBTypeEnumMember objects that represent the enum members for this type.''')
%}
+#endif
};
~SBTypeList();
+#ifdef SWIGPYTHON
%pythoncode%{
def __iter__(self):
'''Iterate over all types in a lldb.SBTypeList object.'''
'''Return the number of types in a lldb.SBTypeList object.'''
return self.GetSize()
%}
+#endif
};
} // namespace lldb
bool
DeleteTypeSynthetic (lldb::SBTypeNameSpecifier);
+#ifdef SWIGPYTHON
%pythoncode %{
class formatters_access_class(object):
name = property(GetName, None)
enabled = property(GetEnabled, SetEnabled)
%}
+#endif
};
GetDescription (lldb::SBStream &description,
lldb::DescriptionLevel description_level);
+#ifdef SWIGPYTHON
%pythoncode %{
name = property(GetName, None, doc='''A read only property that returns the name for this enum member as a string.''')
type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this enum member.''')
signed = property(GetValueAsSigned, None, doc='''A read only property that returns the value of this enum member as a signed integer.''')
unsigned = property(GetValueAsUnsigned, None, doc='''A read only property that returns the value of this enum member as a unsigned integer.''')
%}
+#endif
protected:
friend class SBType;
bool
operator != (lldb::SBTypeFilter &rhs);
+#ifdef SWIGPYTHON
%pythoncode %{
options = property(GetOptions, SetOptions)
count = property(GetNumberOfExpressionPaths)
%}
+#endif
};
bool
operator != (lldb::SBTypeFormat &rhs);
+#ifdef SWIGPYTHON
%pythoncode %{
format = property(GetFormat, SetFormat)
options = property(GetOptions, SetOptions)
%}
+#endif
};
bool
operator != (lldb::SBTypeNameSpecifier &rhs);
+#ifdef SWIGPYTHON
%pythoncode %{
name = property(GetName)
is_regex = property(IsRegex)
%}
+#endif
};
bool
operator != (lldb::SBTypeSummary &rhs);
+#ifdef SWIGPYTHON
%pythoncode %{
options = property(GetOptions, SetOptions)
is_summary_string = property(IsSummaryString)
is_function_name = property(IsFunctionCode)
summary_data = property(GetData)
%}
+#endif
};
bool
operator != (lldb::SBTypeSynthetic &rhs);
+#ifdef SWIGPYTHON
%pythoncode %{
options = property(GetOptions, SetOptions)
contains_code = property(IsClassCode, None)
synthetic_data = property(GetData, None)
%}
+#endif
};
int32_t
GetSignalAtIndex (int32_t index) const;
+#ifdef SWIGPYTHON
%pythoncode %{
def get_unix_signals_list(self):
signals = []
threads = property(get_unix_signals_list, None, doc='''A read only property that returns a list() of valid signal numbers for this platform.''')
%}
+#endif
};
} // namespace lldb
const SBExpressionOptions &options,
const char *name) const;
+#ifdef SWIGPYTHON
%pythoncode %{
def __get_dynamic__ (self):
'''Helper function for the "SBValue.dynamic" property.'''
return
%}
+#endif
};
lldb::SBValue
GetFirstValueByName (const char* name) const;
+#ifdef SWIGPYTHON
%pythoncode %{
def __iter__(self):
'''Iterate over all values in a lldb.SBValueList object.'''
return matches
%}
+#endif
};