Index: lldb/trunk/scripts/interface/SBAddress.i =================================================================== --- lldb/trunk/scripts/interface/SBAddress.i +++ lldb/trunk/scripts/interface/SBAddress.i @@ -51,10 +51,9 @@ SBAddress (lldb::SBSection section, lldb::addr_t offset); - + %feature("docstring", " - Create an address by resolving a load address using the supplied target. - ") SBAddress; + Create an address by resolving a load address using the supplied target.") SBAddress; SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target); ~SBAddress (); @@ -83,7 +82,7 @@ GetLoadAddress (const lldb::SBTarget &target) const; void - SetLoadAddress (lldb::addr_t load_addr, + SetLoadAddress (lldb::addr_t load_addr, lldb::SBTarget &target); bool @@ -103,33 +102,27 @@ lldb::addr_t offset); %feature("docstring", " - //------------------------------------------------------------------ - /// GetSymbolContext() and the following can lookup symbol information for a given address. - /// An address might refer to code or data from an existing module, or it - /// might refer to something on the stack or heap. The following functions - /// will only return valid values if the address has been resolved to a code - /// or data address using 'void SBAddress::SetLoadAddress(...)' or - /// 'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'. - //------------------------------------------------------------------ - ") GetSymbolContext; + GetSymbolContext() and the following can lookup symbol information for a given address. + An address might refer to code or data from an existing module, or it + might refer to something on the stack or heap. The following functions + will only return valid values if the address has been resolved to a code + or data address using 'void SBAddress::SetLoadAddress(...)' or + 'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'.") GetSymbolContext; lldb::SBSymbolContext GetSymbolContext (uint32_t resolve_scope); %feature("docstring", " - //------------------------------------------------------------------ - /// GetModule() and the following grab individual objects for a given address and - /// are less efficient if you want more than one symbol related objects. - /// Use one of the following when you want multiple debug symbol related - /// objects for an address: - /// lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope); - /// lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope); - /// One or more bits from the SymbolContextItem enumerations can be logically - /// OR'ed together to more efficiently retrieve multiple symbol objects. - //------------------------------------------------------------------ - ") GetModule; + GetModule() and the following grab individual objects for a given address and + are less efficient if you want more than one symbol related objects. + Use one of the following when you want multiple debug symbol related + objects for an address: + lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope); + lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope); + One or more bits from the SymbolContextItem enumerations can be logically + OR'ed together to more efficiently retrieve multiple symbol objects.") GetModule; lldb::SBModule GetModule (); - + lldb::SBCompileUnit GetCompileUnit (); @@ -144,7 +137,7 @@ lldb::SBLineEntry GetLineEntry (); - + %pythoncode %{ def __get_load_addr_property__ (self): '''Get the load address for a lldb.SBAddress using the current target.''' Index: lldb/trunk/scripts/interface/SBBlock.i =================================================================== --- lldb/trunk/scripts/interface/SBBlock.i +++ lldb/trunk/scripts/interface/SBBlock.i @@ -34,36 +34,32 @@ %feature("docstring", " Get the function name if this block represents an inlined function; - otherwise, return None. - ") GetInlinedName; + otherwise, return None.") GetInlinedName; const char * GetInlinedName () const; %feature("docstring", " Get the call site file if this block represents an inlined function; - otherwise, return an invalid file spec. - ") GetInlinedCallSiteFile; + otherwise, return an invalid file spec.") GetInlinedCallSiteFile; lldb::SBFileSpec GetInlinedCallSiteFile () const; %feature("docstring", " Get the call site line if this block represents an inlined function; - otherwise, return 0. - ") GetInlinedCallSiteLine; - uint32_t + otherwise, return 0.") GetInlinedCallSiteLine; + uint32_t GetInlinedCallSiteLine () const; %feature("docstring", " Get the call site column if this block represents an inlined function; - otherwise, return 0. - ") GetInlinedCallSiteColumn; + otherwise, return 0.") GetInlinedCallSiteColumn; uint32_t GetInlinedCallSiteColumn () const; %feature("docstring", "Get the parent block.") GetParent; lldb::SBBlock GetParent (); - + %feature("docstring", "Get the inlined block that is or contains this block.") GetContainingInlinedBlock; lldb::SBBlock GetContainingInlinedBlock (); @@ -71,11 +67,11 @@ %feature("docstring", "Get the sibling block for this block.") GetSibling; lldb::SBBlock GetSibling (); - + %feature("docstring", "Get the first child block.") GetFirstChild; lldb::SBBlock GetFirstChild (); - + uint32_t GetNumRanges (); @@ -114,12 +110,12 @@ '''A helper object that will lazily hand out an array of lldb.SBAddress that represent address ranges for a block.''' def __init__(self, sbblock): self.sbblock = sbblock - + def __len__(self): if self.sbblock: return int(self.sbblock.GetNumRanges()) return 0 - + def __getitem__(self, key): count = len(self) if type(key) is int: @@ -131,11 +127,11 @@ else: print("error: unsupported item type: %s" % type(key)) return None - + def get_ranges_access_object(self): '''An accessor function that returns a ranges_access() object which allows lazy block address ranges access.''' return self.ranges_access (self) - + def get_ranges_array(self): '''An accessor function that returns an array object that contains all ranges in this block object.''' if not hasattr(self, 'ranges_array'): @@ -143,7 +139,7 @@ for idx in range(self.num_ranges): self.ranges_array.append ([self.GetRangeStartAddress(idx), self.GetRangeEndAddress(idx)]) return self.ranges_array - + def get_call_site(self): return declaration(self.GetInlinedCallSiteFile(), self.GetInlinedCallSiteLine(), self.GetInlinedCallSiteColumn()) @@ -152,10 +148,10 @@ __swig_getmethods__["first_child"] = GetFirstChild if _newclass: first_child = property(GetFirstChild, None, doc='''A read only property that returns the same result as GetFirstChild().''') - + __swig_getmethods__["call_site"] = get_call_site if _newclass: call_site = property(get_call_site, None, doc='''A read only property that returns a lldb.declaration object that contains the inlined call site file, line and column.''') - + __swig_getmethods__["sibling"] = GetSibling if _newclass: sibling = property(GetSibling, None, doc='''A read only property that returns the same result as GetSibling().''') Index: lldb/trunk/scripts/interface/SBBreakpoint.i =================================================================== --- lldb/trunk/scripts/interface/SBBreakpoint.i +++ lldb/trunk/scripts/interface/SBBreakpoint.i @@ -117,13 +117,13 @@ bool IsEnabled (); - + void SetOneShot (bool one_shot); bool IsOneShot (); - + bool IsInternal (); @@ -135,20 +135,14 @@ uint32_t GetIgnoreCount () const; - + %feature("docstring", " - //-------------------------------------------------------------------------- - /// The breakpoint stops only if the condition expression evaluates to true. - //-------------------------------------------------------------------------- - ") SetCondition; - void + The breakpoint stops only if the condition expression evaluates to true.") SetCondition; + void SetCondition (const char *condition); - + %feature("docstring", " - //------------------------------------------------------------------ - /// Get the condition expression for the breakpoint. - //------------------------------------------------------------------ - ") GetCondition; + Get the condition expression for the breakpoint.") GetCondition; const char * GetCondition (); @@ -161,52 +155,46 @@ lldb::tid_t GetThreadID (); - + void SetThreadIndex (uint32_t index); - + uint32_t GetThreadIndex() const; - + void SetThreadName (const char *thread_name); - + const char * GetThreadName () const; - - void + + void SetQueueName (const char *queue_name); - + const char * GetQueueName () const; %feature("docstring", " - //------------------------------------------------------------------ - /// Set the name of the script function to be called when the breakpoint is hit. - //------------------------------------------------------------------ - ") SetScriptCallbackFunction; + Set the name of the script function to be called when the breakpoint is hit.") SetScriptCallbackFunction; void SetScriptCallbackFunction (const char *callback_function_name); %feature("docstring", " - //------------------------------------------------------------------ - /// Provide the body for the script function to be called when the breakpoint is hit. - /// The body will be wrapped in a function, which be passed two arguments: - /// 'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint - /// 'bpno' - which is the SBBreakpointLocation to which the callback was attached. - /// - /// The error parameter is currently ignored, but will at some point hold the Python - /// compilation diagnostics. - /// Returns true if the body compiles successfully, false if not. - //------------------------------------------------------------------ - ") SetScriptCallbackBody; + Provide the body for the script function to be called when the breakpoint is hit. + The body will be wrapped in a function, which be passed two arguments: + 'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint + 'bpno' - which is the SBBreakpointLocation to which the callback was attached. + + The error parameter is currently ignored, but will at some point hold the Python + compilation diagnostics. + Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody; SBError SetScriptCallbackBody (const char *script_body_text); - + void SetCommandLineCommands(SBStringList &commands); bool GetCommandLineCommands(SBStringList &commands); - + bool AddName (const char *new_name); @@ -215,10 +203,10 @@ bool MatchesName (const char *name); - + void GetNames (SBStringList &names); - + size_t GetNumResolvedLocations() const; @@ -228,7 +216,7 @@ bool GetDescription (lldb::SBStream &description); - bool + bool GetDescription(lldb::SBStream &description, bool include_locations); // Can only be called from a ScriptedBreakpointResolver... @@ -237,49 +225,49 @@ bool operator == (const lldb::SBBreakpoint& rhs); - + bool operator != (const lldb::SBBreakpoint& rhs); static bool EventIsBreakpointEvent (const lldb::SBEvent &event); - + static lldb::BreakpointEventType GetBreakpointEventTypeFromEvent (const lldb::SBEvent& event); static lldb::SBBreakpoint GetBreakpointFromEvent (const lldb::SBEvent& event); - + static lldb::SBBreakpointLocation GetBreakpointLocationAtIndexFromEvent (const lldb::SBEvent& event, uint32_t loc_idx); - + static uint32_t GetNumBreakpointLocationsFromEvent (const lldb::SBEvent &event_sp); - + bool IsHardware (); %pythoncode %{ - + class locations_access(object): '''A helper object that will lazily hand out locations for a breakpoint when supplied an index.''' def __init__(self, sbbreakpoint): self.sbbreakpoint = sbbreakpoint - + def __len__(self): if self.sbbreakpoint: return int(self.sbbreakpoint.GetNumLocations()) return 0 - + def __getitem__(self, key): if type(key) is int and key < len(self): return self.sbbreakpoint.GetLocationAtIndex(key) return None - + def get_locations_access_object(self): '''An accessor function that returns a locations_access() object which allows lazy location access from a lldb.SBBreakpoint object.''' return self.locations_access (self) - + def get_breakpoint_location_list(self): '''An accessor function that returns a list() that contains all locations in a lldb.SBBreakpoint object.''' locations = [] @@ -300,13 +288,13 @@ __swig_getmethods__["locations"] = get_breakpoint_location_list if _newclass: locations = property(get_breakpoint_location_list, None, doc='''A read only property that returns a list() of lldb.SBBreakpointLocation objects for this breakpoint.''') - + __swig_getmethods__["location"] = get_locations_access_object if _newclass: 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]).''') __swig_getmethods__["id"] = GetID if _newclass: id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''') - + __swig_getmethods__["enabled"] = IsEnabled __swig_setmethods__["enabled"] = SetEnabled if _newclass: enabled = property(IsEnabled, SetEnabled, doc='''A read/write property that configures whether this breakpoint is enabled or not.''') @@ -314,13 +302,13 @@ __swig_getmethods__["one_shot"] = IsOneShot __swig_setmethods__["one_shot"] = SetOneShot if _newclass: one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.''') - + __swig_getmethods__["num_locations"] = GetNumLocations if _newclass: num_locations = property(GetNumLocations, None, doc='''A read only property that returns the count of locations of this breakpoint.''') %} - + }; class SBBreakpointListImpl; @@ -329,14 +317,14 @@ { public: SBBreakpointList(SBTarget &target); - + ~SBBreakpointList(); size_t GetSize() const; - + SBBreakpoint GetBreakpointAtIndex(size_t idx); - + SBBreakpoint FindBreakpointByID(lldb::break_id_t); Index: lldb/trunk/scripts/interface/SBBreakpointLocation.i =================================================================== --- lldb/trunk/scripts/interface/SBBreakpointLocation.i +++ lldb/trunk/scripts/interface/SBBreakpointLocation.i @@ -30,7 +30,7 @@ break_id_t GetID (); - + bool IsValid() const; @@ -38,7 +38,7 @@ lldb::SBAddress GetAddress(); - + lldb::addr_t GetLoadAddress (); @@ -58,49 +58,37 @@ SetIgnoreCount (uint32_t n); %feature("docstring", " - //-------------------------------------------------------------------------- - /// The breakpoint location stops only if the condition expression evaluates - /// to true. - //-------------------------------------------------------------------------- - ") SetCondition; - void + The breakpoint location stops only if the condition expression evaluates + to true.") SetCondition; + void SetCondition (const char *condition); - + %feature("docstring", " - //------------------------------------------------------------------ - /// Get the condition expression for the breakpoint location. - //------------------------------------------------------------------ - ") GetCondition; + Get the condition expression for the breakpoint location.") GetCondition; const char * GetCondition (); bool GetAutoContinue(); - + void SetAutoContinue(bool auto_continue); %feature("docstring", " - //------------------------------------------------------------------ - /// Set the callback to the given Python function name. - //------------------------------------------------------------------ - ") SetScriptCallbackFunction; + Set the callback to the given Python function name.") SetScriptCallbackFunction; void SetScriptCallbackFunction (const char *callback_function_name); %feature("docstring", " - //------------------------------------------------------------------ - /// Provide the body for the script function to be called when the breakpoint location is hit. - /// The body will be wrapped in a function, which be passed two arguments: - /// 'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint - /// 'bpno' - which is the SBBreakpointLocation to which the callback was attached. - /// - /// The error parameter is currently ignored, but will at some point hold the Python - /// compilation diagnostics. - /// Returns true if the body compiles successfully, false if not. - //------------------------------------------------------------------ - ") SetScriptCallbackBody; + Provide the body for the script function to be called when the breakpoint location is hit. + The body will be wrapped in a function, which be passed two arguments: + 'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint + 'bpno' - which is the SBBreakpointLocation to which the callback was attached. + + The error parameter is currently ignored, but will at some point hold the Python + compilation diagnostics. + Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody; SBError SetScriptCallbackBody (const char *script_body_text); - + void SetCommandLineCommands(SBStringList &commands); bool GetCommandLineCommands(SBStringList &commands); @@ -110,22 +98,22 @@ lldb::tid_t GetThreadID (); - + void SetThreadIndex (uint32_t index); - + uint32_t GetThreadIndex() const; - + void SetThreadName (const char *thread_name); - + const char * GetThreadName () const; - - void + + void SetQueueName (const char *queue_name); - + const char * GetQueueName () const; Index: lldb/trunk/scripts/interface/SBBreakpointName.i =================================================================== --- lldb/trunk/scripts/interface/SBBreakpointName.i +++ lldb/trunk/scripts/interface/SBBreakpointName.i @@ -17,7 +17,7 @@ using that name. Adding a name to a breakpoint will also apply any of the set options to that breakpoint. -You can also set permissions on a breakpoint name to disable listing, deleting +You can also set permissions on a breakpoint name to disable listing, deleting and disabling breakpoints. That will disallow the given operation for breakpoints except when the breakpoint is mentioned by ID. So for instance deleting all the breakpoints won't delete breakpoints so marked." @@ -25,7 +25,7 @@ class LLDB_API SBBreakpointName { public: SBBreakpointName(); - + SBBreakpointName(SBTarget &target, const char *name); SBBreakpointName(SBBreakpoint &bkpt, const char *name); @@ -45,7 +45,7 @@ explicit operator bool() const; bool IsValid() const; - + const char *GetName() const; void SetEnabled(bool enable); @@ -94,13 +94,13 @@ const char *GetHelpString() const; void SetHelpString(const char *help_string); - + bool GetAllowList() const; void SetAllowList(bool value); - + bool GetAllowDelete(); void SetAllowDelete(bool value); - + bool GetAllowDisable(); void SetAllowDisable(bool value); Index: lldb/trunk/scripts/interface/SBBroadcaster.i =================================================================== --- lldb/trunk/scripts/interface/SBBroadcaster.i +++ lldb/trunk/scripts/interface/SBBroadcaster.i @@ -27,7 +27,7 @@ SBBroadcaster (const char *name); SBBroadcaster (const SBBroadcaster &rhs); - + ~SBBroadcaster(); bool @@ -58,10 +58,10 @@ bool RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX); - + bool operator == (const lldb::SBBroadcaster &rhs) const; - + bool operator != (const lldb::SBBroadcaster &rhs) const; }; Index: lldb/trunk/scripts/interface/SBCommandInterpreter.i =================================================================== --- lldb/trunk/scripts/interface/SBCommandInterpreter.i +++ lldb/trunk/scripts/interface/SBCommandInterpreter.i @@ -18,7 +18,6 @@ PrintResults: true AddToHistory: true - ") SBCommandInterpreterRunOptions; class SBCommandInterpreterRunOptions { @@ -115,8 +114,7 @@ The HandleCommand() instance method takes two args: the command string and an SBCommandReturnObject instance which encapsulates the result of command -execution. -") SBCommandInterpreter; +execution.") SBCommandInterpreter; class SBCommandInterpreter { public: Index: lldb/trunk/scripts/interface/SBCommandReturnObject.i =================================================================== --- lldb/trunk/scripts/interface/SBCommandReturnObject.i +++ lldb/trunk/scripts/interface/SBCommandReturnObject.i @@ -44,13 +44,13 @@ const char * GetOutput (bool only_if_no_immediate); - + const char * GetError (bool if_no_immediate); - + size_t PutOutput (FILE *fh); - + size_t PutError (FILE *fh); @@ -59,11 +59,11 @@ void SetStatus (lldb::ReturnStatus status); - + void SetError (lldb::SBError &error, const char *fallback_error_cstr = NULL); - + void SetError (const char *error_cstr); @@ -84,9 +84,9 @@ bool GetDescription (lldb::SBStream &description); - - // wrapping here so that lldb takes ownership of the + + // wrapping here so that lldb takes ownership of the // new FILE* created inside of the swig interface %extend { void SetImmediateOutputFile(FILE *fh) { Index: lldb/trunk/scripts/interface/SBCompileUnit.i =================================================================== --- lldb/trunk/scripts/interface/SBCompileUnit.i +++ lldb/trunk/scripts/interface/SBCompileUnit.i @@ -88,37 +88,34 @@ FindSupportFileIndex (uint32_t start_idx, const SBFileSpec &sb_file, bool full); %feature("docstring", " - //------------------------------------------------------------------ - /// Get all types matching \a type_mask from debug info in this - /// compile unit. - /// - /// @param[in] type_mask - /// A bitfield that consists of one or more bits logically OR'ed - /// together from the lldb::TypeClass enumeration. This allows - /// you to request only structure types, or only class, struct - /// and union types. Passing in lldb::eTypeClassAny will return - /// all types found in the debug information for this compile - /// unit. - /// - /// @return - /// A list of types in this compile unit that match \a type_mask - //------------------------------------------------------------------ - ") GetTypes; + Get all types matching \a type_mask from debug info in this + compile unit. + + @param[in] type_mask + A bitfield that consists of one or more bits logically OR'ed + together from the lldb::TypeClass enumeration. This allows + you to request only structure types, or only class, struct + and union types. Passing in lldb::eTypeClassAny will return + all types found in the debug information for this compile + unit. + + @return + A list of types in this compile unit that match \a type_mask") GetTypes; lldb::SBTypeList GetTypes (uint32_t type_mask = lldb::eTypeClassAny); - + lldb::LanguageType GetLanguage (); - + bool GetDescription (lldb::SBStream &description); - + bool operator == (const lldb::SBCompileUnit &rhs) const; - + bool operator != (const lldb::SBCompileUnit &rhs) const; - + %pythoncode %{ def __iter__(self): '''Iterate over all line entries in a lldb.SBCompileUnit object.''' @@ -131,7 +128,7 @@ __swig_getmethods__["file"] = GetFileSpec if _newclass: 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.''') - + __swig_getmethods__["num_line_entries"] = GetNumLineEntries if _newclass: 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.''') %} Index: lldb/trunk/scripts/interface/SBData.i =================================================================== --- lldb/trunk/scripts/interface/SBData.i +++ lldb/trunk/scripts/interface/SBData.i @@ -21,7 +21,7 @@ uint8_t GetAddressByteSize (); - + void SetAddressByteSize (uint8_t addr_byte_size); @@ -38,7 +38,7 @@ lldb::ByteOrder GetByteOrder(); - + void SetByteOrder (lldb::ByteOrder endian); @@ -95,47 +95,47 @@ bool Append (const SBData& rhs); - + static lldb::SBData CreateDataFromCString (lldb::ByteOrder endian, uint32_t addr_byte_size, const char* data); - + // in the following CreateData*() and SetData*() prototypes, the two parameters array and array_len // should not be renamed or rearranged, because doing so will break the SWIG typemap static lldb::SBData CreateDataFromUInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t* array, size_t array_len); - + static lldb::SBData CreateDataFromUInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t* array, size_t array_len); - + static lldb::SBData CreateDataFromSInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t* array, size_t array_len); - + static lldb::SBData CreateDataFromSInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t* array, size_t array_len); - + static lldb::SBData CreateDataFromDoubleArray (lldb::ByteOrder endian, uint32_t addr_byte_size, double* array, size_t array_len); - + bool SetDataFromCString (const char* data); - + bool SetDataFromUInt64Array (uint64_t* array, size_t array_len); - + bool SetDataFromUInt32Array (uint32_t* array, size_t array_len); - + bool SetDataFromSInt64Array (int64_t* array, size_t array_len); - + bool SetDataFromSInt32Array (int32_t* array, size_t array_len); - + bool SetDataFromDoubleArray (double* array, size_t array_len); %pythoncode %{ - + class read_data_helper: def __init__(self, sbdata, readerfunc, item_size): self.sbdata = sbdata @@ -160,7 +160,7 @@ return int(self.sbdata.GetByteSize()/self.item_size) def all(self): return self[0:len(self)] - + @classmethod def CreateDataFromInt (cls, value, size = None, target = None, ptr_size = None, endian = None): import sys @@ -203,7 +203,7 @@ def _make_helper(self, sbdata, getfunc, itemsize): return self.read_data_helper(sbdata, getfunc, itemsize) - + def _make_helper_uint8(self): return self._make_helper(self, SBData.GetUnsignedInt8, 1) @@ -233,107 +233,107 @@ def _make_helper_double(self): return self._make_helper(self, SBData.GetDouble, 8) - + def _read_all_uint8(self): return self._make_helper_uint8().all() def _read_all_uint16(self): return self._make_helper_uint16().all() - + def _read_all_uint32(self): return self._make_helper_uint32().all() - + def _read_all_uint64(self): return self._make_helper_uint64().all() - + def _read_all_sint8(self): return self._make_helper_sint8().all() - + def _read_all_sint16(self): return self._make_helper_sint16().all() - + def _read_all_sint32(self): return self._make_helper_sint32().all() - + def _read_all_sint64(self): return self._make_helper_sint64().all() - + def _read_all_float(self): return self._make_helper_float().all() - + def _read_all_double(self): return self._make_helper_double().all() __swig_getmethods__["uint8"] = _make_helper_uint8 if _newclass: uint8 = property(_make_helper_uint8, None, doc='''A read only property that returns an array-like object out of which you can read uint8 values.''') - + __swig_getmethods__["uint16"] = _make_helper_uint16 if _newclass: uint16 = property(_make_helper_uint16, None, doc='''A read only property that returns an array-like object out of which you can read uint16 values.''') - + __swig_getmethods__["uint32"] = _make_helper_uint32 if _newclass: uint32 = property(_make_helper_uint32, None, doc='''A read only property that returns an array-like object out of which you can read uint32 values.''') - + __swig_getmethods__["uint64"] = _make_helper_uint64 if _newclass: uint64 = property(_make_helper_uint64, None, doc='''A read only property that returns an array-like object out of which you can read uint64 values.''') __swig_getmethods__["sint8"] = _make_helper_sint8 if _newclass: sint8 = property(_make_helper_sint8, None, doc='''A read only property that returns an array-like object out of which you can read sint8 values.''') - + __swig_getmethods__["sint16"] = _make_helper_sint16 if _newclass: sint16 = property(_make_helper_sint16, None, doc='''A read only property that returns an array-like object out of which you can read sint16 values.''') - + __swig_getmethods__["sint32"] = _make_helper_sint32 if _newclass: sint32 = property(_make_helper_sint32, None, doc='''A read only property that returns an array-like object out of which you can read sint32 values.''') - + __swig_getmethods__["sint64"] = _make_helper_sint64 if _newclass: sint64 = property(_make_helper_sint64, None, doc='''A read only property that returns an array-like object out of which you can read sint64 values.''') - + __swig_getmethods__["float"] = _make_helper_float if _newclass: float = property(_make_helper_float, None, doc='''A read only property that returns an array-like object out of which you can read float values.''') __swig_getmethods__["double"] = _make_helper_double if _newclass: double = property(_make_helper_double, None, doc='''A read only property that returns an array-like object out of which you can read double values.''') - + __swig_getmethods__["uint8s"] = _read_all_uint8 if _newclass: uint8s = property(_read_all_uint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint8 values.''') - + __swig_getmethods__["uint16s"] = _read_all_uint16 if _newclass: uint16s = property(_read_all_uint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint16 values.''') - + __swig_getmethods__["uint32s"] = _read_all_uint32 if _newclass: uint32s = property(_read_all_uint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint32 values.''') - + __swig_getmethods__["uint64s"] = _read_all_uint64 if _newclass: uint64s = property(_read_all_uint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint64 values.''') __swig_getmethods__["sint8s"] = _read_all_sint8 if _newclass: sint8s = property(_read_all_sint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint8 values.''') - + __swig_getmethods__["sint16s"] = _read_all_sint16 if _newclass: sint16s = property(_read_all_sint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint16 values.''') - + __swig_getmethods__["sint32s"] = _read_all_sint32 if _newclass: sint32s = property(_read_all_sint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint32 values.''') - + __swig_getmethods__["sint64s"] = _read_all_sint64 if _newclass: sint64s = property(_read_all_sint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint64 values.''') - + __swig_getmethods__["floats"] = _read_all_float if _newclass: floats = property(_read_all_float, None, doc='''A read only property that returns an array with all the contents of this SBData represented as float values.''') __swig_getmethods__["doubles"] = _read_all_double if _newclass: doubles = property(_read_all_double, None, doc='''A read only property that returns an array with all the contents of this SBData represented as double values.''') - + %} - + %pythoncode %{ __swig_getmethods__["byte_order"] = GetByteOrder __swig_setmethods__["byte_order"] = SetByteOrder if _newclass: byte_order = property(GetByteOrder, SetByteOrder, doc='''A read/write property getting and setting the endianness of this SBData (data.byte_order = lldb.eByteOrderLittle).''') - + __swig_getmethods__["size"] = GetByteSize if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size the same result as GetByteSize().''') - + %} }; Index: lldb/trunk/scripts/interface/SBDebugger.i =================================================================== --- lldb/trunk/scripts/interface/SBDebugger.i +++ lldb/trunk/scripts/interface/SBDebugger.i @@ -113,8 +113,7 @@ error = lldb.SBError() process = target.AttachToProcessWithName(debugger.GetListener(), 'PROCESS_NAME', False, error) -or the equivalent arguments for AttachToProcessWithID. -") SBDebugger; +or the equivalent arguments for AttachToProcessWithID.") SBDebugger; class SBDebugger { public: @@ -279,8 +278,7 @@ @param idx Zero-based index of the platform for which info should be retrieved, must be less than the value returned by - GetNumAvailablePlatforms(). - ") GetAvailablePlatformInfoAtIndex; + GetNumAvailablePlatforms().") GetAvailablePlatformInfoAtIndex; lldb::SBStructuredData GetAvailablePlatformInfoAtIndex (uint32_t idx); Index: lldb/trunk/scripts/interface/SBDeclaration.i =================================================================== --- lldb/trunk/scripts/interface/SBDeclaration.i +++ lldb/trunk/scripts/interface/SBDeclaration.i @@ -7,63 +7,63 @@ //===----------------------------------------------------------------------===// namespace lldb { - + %feature("docstring", "Specifies an association with a line and column for a variable." ) SBDeclaration; class SBDeclaration { public: - + SBDeclaration (); - + SBDeclaration (const lldb::SBDeclaration &rhs); - + ~SBDeclaration (); - + bool IsValid () const; explicit operator bool() const; - + lldb::SBFileSpec GetFileSpec () const; - + uint32_t GetLine () const; - + uint32_t GetColumn () const; - + bool GetDescription (lldb::SBStream &description); - + void SetFileSpec (lldb::SBFileSpec filespec); - + void SetLine (uint32_t line); - + void SetColumn (uint32_t column); - + bool operator == (const lldb::SBDeclaration &rhs) const; - + bool operator != (const lldb::SBDeclaration &rhs) const; - + %pythoncode %{ __swig_getmethods__["file"] = GetFileSpec if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''') - + __swig_getmethods__["line"] = GetLine if _newclass: 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.''') - + __swig_getmethods__["column"] = GetColumn if _newclass: 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.''') %} - + }; - + } // namespace lldb Index: lldb/trunk/scripts/interface/SBError.i =================================================================== --- lldb/trunk/scripts/interface/SBError.i +++ lldb/trunk/scripts/interface/SBError.i @@ -53,8 +53,7 @@ self.assertTrue(error.Success() and process, PROCESS_IS_VALID) checks that after calling the target.Launch() method there's no error -condition and we get back a void process object. -") SBError; +condition and we get back a void process object.") SBError; class SBError { public: @@ -105,23 +104,23 @@ bool GetDescription (lldb::SBStream &description); - + %pythoncode %{ __swig_getmethods__["value"] = GetError if _newclass: value = property(GetError, None, doc='''A read only property that returns the same result as GetError().''') - + __swig_getmethods__["fail"] = Fail if _newclass: fail = property(Fail, None, doc='''A read only property that returns the same result as Fail().''') - + __swig_getmethods__["success"] = Success if _newclass: success = property(Success, None, doc='''A read only property that returns the same result as Success().''') - + __swig_getmethods__["description"] = GetCString if _newclass: description = property(GetCString, None, doc='''A read only property that returns the same result as GetCString().''') - + __swig_getmethods__["type"] = GetType if _newclass: type = property(GetType, None, doc='''A read only property that returns the same result as GetType().''') - + %} }; Index: lldb/trunk/scripts/interface/SBEvent.i =================================================================== --- lldb/trunk/scripts/interface/SBEvent.i +++ lldb/trunk/scripts/interface/SBEvent.i @@ -105,15 +105,14 @@ process.Kill() # Wait until the 'MyListeningThread' terminates. - my_thread.join() -") SBEvent; + my_thread.join()") SBEvent; class SBEvent { public: SBEvent(); SBEvent (const lldb::SBEvent &rhs); - + %feature("autodoc", "__init__(self, int type, str data) -> SBEvent (make an event that contains a C string)" ) SBEvent; Index: lldb/trunk/scripts/interface/SBExecutionContext.i =================================================================== --- lldb/trunk/scripts/interface/SBExecutionContext.i +++ lldb/trunk/scripts/interface/SBExecutionContext.i @@ -7,36 +7,36 @@ //===----------------------------------------------------------------------===// namespace lldb { - + class SBExecutionContext { public: SBExecutionContext(); - + SBExecutionContext (const lldb::SBExecutionContext &rhs); - + SBExecutionContext (const lldb::SBTarget &target); - + SBExecutionContext (const lldb::SBProcess &process); - + SBExecutionContext (lldb::SBThread thread); // can't be a const& because SBThread::get() isn't itself a const function - + SBExecutionContext (const lldb::SBFrame &frame); - + ~SBExecutionContext(); - + SBTarget GetTarget () const; - + SBProcess GetProcess () const; - + SBThread GetThread () const; - + SBFrame GetFrame () const; - + %pythoncode %{ __swig_getmethods__["target"] = GetTarget if _newclass: target = property(GetTarget, None, doc='''A read only property that returns the same result as GetTarget().''') @@ -46,11 +46,11 @@ __swig_getmethods__["thread"] = GetThread if _newclass: thread = property(GetThread, None, doc='''A read only property that returns the same result as GetThread().''') - + __swig_getmethods__["frame"] = GetFrame if _newclass: frame = property(GetFrame, None, doc='''A read only property that returns the same result as GetFrame().''') %} }; - + } // namespace lldb Index: lldb/trunk/scripts/interface/SBExpressionOptions.i =================================================================== --- lldb/trunk/scripts/interface/SBExpressionOptions.i +++ lldb/trunk/scripts/interface/SBExpressionOptions.i @@ -21,76 +21,76 @@ SBExpressionOptions(); SBExpressionOptions (const lldb::SBExpressionOptions &rhs); - + ~SBExpressionOptions(); bool GetCoerceResultToId () const; - + %feature("docstring", "Sets whether to coerce the expression result to ObjC id type after evaluation.") SetCoerceResultToId; - + void SetCoerceResultToId (bool coerce = true); - + bool GetUnwindOnError () const; - + %feature("docstring", "Sets whether to unwind the expression stack on error.") SetUnwindOnError; - + void SetUnwindOnError (bool unwind = true); - + bool GetIgnoreBreakpoints () const; - + %feature("docstring", "Sets whether to ignore breakpoint hits while running expressions.") SetUnwindOnError; - + void SetIgnoreBreakpoints (bool ignore = true); - + lldb::DynamicValueType GetFetchDynamicValue () const; - + %feature("docstring", "Sets whether to cast the expression result to its dynamic type.") SetFetchDynamicValue; - + void SetFetchDynamicValue (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget); uint32_t GetTimeoutInMicroSeconds () const; - + %feature("docstring", "Sets the timeout in microseconds to run the expression for. If try all threads is set to true and the expression doesn't complete within the specified timeout, all threads will be resumed for the same timeout to see if the expresson will finish.") SetTimeoutInMicroSeconds; void SetTimeoutInMicroSeconds (uint32_t timeout = 0); - + uint32_t GetOneThreadTimeoutInMicroSeconds () const; - + %feature("docstring", "Sets the timeout in microseconds to run the expression on one thread before either timing out or trying all threads.") SetTimeoutInMicroSeconds; void SetOneThreadTimeoutInMicroSeconds (uint32_t timeout = 0); - + bool GetTryAllThreads () const; - + %feature("docstring", "Sets whether to run all threads if the expression does not complete on one thread.") SetTryAllThreads; void SetTryAllThreads (bool run_others = true); - + bool GetStopOthers () const; - + %feature("docstring", "Sets whether to stop other threads at all while running expressins. If false, TryAllThreads does nothing.") SetTryAllThreads; void SetStopOthers (bool stop_others = true); - + bool GetTrapExceptions () const; - + %feature("docstring", "Sets whether to abort expression evaluation if an exception is thrown while executing. Don't set this to false unless you know the function you are calling traps all exceptions itself.") SetTryAllThreads; void SetTrapExceptions (bool trap_exceptions = true); - + %feature ("docstring", "Sets the language that LLDB should assume the expression is written in") SetLanguage; void SetLanguage (lldb::LanguageType language); @@ -101,10 +101,10 @@ %feature("docstring", "Sets whether to generate debug information for the expression and also controls if a SBModule is generated.") SetGenerateDebugInfo; void SetGenerateDebugInfo (bool b = true); - + bool GetSuppressPersistentResult (); - + %feature("docstring", "Sets whether to produce a persistent result that can be used in future expressions.") SetSuppressPersistentResult; void SetSuppressPersistentResult (bool b = false); @@ -117,11 +117,11 @@ %feature("docstring", "Sets the prefix to use for this expression. This prefix gets inserted after the 'target.expr-prefix' prefix contents, but before the wrapped expression function body.") SetPrefix; void SetPrefix (const char *prefix); - + %feature("docstring", "Sets whether to auto-apply fix-it hints to the expression being evaluated.") SetAutoApplyFixIts; void SetAutoApplyFixIts(bool b = true); - + %feature("docstring", "Gets whether to auto-apply fix-it hints to an expression.") GetAutoApplyFixIts; bool GetAutoApplyFixIts(); @@ -131,11 +131,11 @@ void SetTopLevel(bool b = true); - + %feature("docstring", "Gets whether to JIT an expression if it cannot be interpreted.") GetAllowJIT; bool GetAllowJIT(); - + %feature("docstring", "Sets whether to JIT an expression if it cannot be interpreted.") SetAllowJIT; void SetAllowJIT(bool allow); Index: lldb/trunk/scripts/interface/SBFileSpec.i =================================================================== --- lldb/trunk/scripts/interface/SBFileSpec.i +++ lldb/trunk/scripts/interface/SBFileSpec.i @@ -27,8 +27,7 @@ gets the line entry from the symbol context when a thread is stopped. It gets the file spec corresponding to the line entry and checks that -the filename and the directory matches what we expect. -") SBFileSpec; +the filename and the directory matches what we expect.") SBFileSpec; class SBFileSpec { public: @@ -65,7 +64,7 @@ void SetFilename(const char *filename); - + void SetDirectory(const char *directory); @@ -98,10 +97,10 @@ __swig_getmethods__["basename"] = GetFilename if _newclass: basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''') - + __swig_getmethods__["dirname"] = GetDirectory if _newclass: dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''') - + __swig_getmethods__["exists"] = Exists if _newclass: exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''') %} Index: lldb/trunk/scripts/interface/SBFileSpecList.i =================================================================== --- lldb/trunk/scripts/interface/SBFileSpecList.i +++ lldb/trunk/scripts/interface/SBFileSpecList.i @@ -22,19 +22,19 @@ bool GetDescription (SBStream &description) const; - + void Append (const SBFileSpec &sb_file); - + bool AppendIfUnique (const SBFileSpec &sb_file); - + void Clear(); - + uint32_t FindFileIndex (uint32_t idx, const SBFileSpec &sb_file, bool full); - + const SBFileSpec GetFileSpecAtIndex (uint32_t idx) const; Index: lldb/trunk/scripts/interface/SBFrame.i =================================================================== --- lldb/trunk/scripts/interface/SBFrame.i +++ lldb/trunk/scripts/interface/SBFrame.i @@ -50,7 +50,7 @@ SBFrame (); SBFrame (const lldb::SBFrame &rhs); - + ~SBFrame(); bool @@ -104,50 +104,46 @@ GetSymbol () const; %feature("docstring", " - /// Gets the deepest block that contains the frame PC. - /// - /// See also GetFrameBlock(). - ") GetBlock; + Gets the deepest block that contains the frame PC. + + See also GetFrameBlock().") GetBlock; lldb::SBBlock GetBlock () const; %feature("docstring", " - /// Get the appropriate function name for this frame. Inlined functions in - /// LLDB are represented by Blocks that have inlined function information, so - /// just looking at the SBFunction or SBSymbol for a frame isn't enough. - /// This function will return the appropriate function, symbol or inlined - /// function name for the frame. - /// - /// This function returns: - /// - the name of the inlined function (if there is one) - /// - the name of the concrete function (if there is one) - /// - the name of the symbol (if there is one) - /// - NULL - /// - /// See also IsInlined(). - ") GetFunctionName; + Get the appropriate function name for this frame. Inlined functions in + LLDB are represented by Blocks that have inlined function information, so + just looking at the SBFunction or SBSymbol for a frame isn't enough. + This function will return the appropriate function, symbol or inlined + function name for the frame. + + This function returns: + - the name of the inlined function (if there is one) + - the name of the concrete function (if there is one) + - the name of the symbol (if there is one) + - NULL + + See also IsInlined().") GetFunctionName; const char * GetFunctionName(); - + const char * GetDisplayFunctionName (); const char * GetFunctionName() const; - + %feature("docstring", " - /// Returns the language of the frame's SBFunction, or if there. - /// is no SBFunction, guess the language from the mangled name. - /// . - ") GuessLanguage; + Returns the language of the frame's SBFunction, or if there. + is no SBFunction, guess the language from the mangled name. + .") GuessLanguage; lldb::LanguageType GuessLanguage() const; %feature("docstring", " - /// Return true if this frame represents an inlined function. - /// - /// See also GetFunctionName(). - ") IsInlined; + Return true if this frame represents an inlined function. + + See also GetFunctionName().") IsInlined; bool IsInlined(); @@ -155,10 +151,9 @@ IsInlined() const; %feature("docstring", " - /// Return true if this frame is artificial (e.g a frame synthesized to - /// capture a tail call). Local variables may not be available in an artificial - /// frame. - ") IsArtificial; + Return true if this frame is artificial (e.g a frame synthesized to + capture a tail call). Local variables may not be available in an artificial + frame.") IsArtificial; bool IsArtificial(); @@ -166,35 +161,33 @@ IsArtificial() const; %feature("docstring", " - /// The version that doesn't supply a 'use_dynamic' value will use the - /// target's default. - ") EvaluateExpression; + The version that doesn't supply a 'use_dynamic' value will use the + target's default.") EvaluateExpression; lldb::SBValue - EvaluateExpression (const char *expr); + EvaluateExpression (const char *expr); lldb::SBValue EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic); lldb::SBValue EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error); - + lldb::SBValue EvaluateExpression (const char *expr, SBExpressionOptions &options); %feature("docstring", " - /// Gets the lexical block that defines the stack frame. Another way to think - /// of this is it will return the block that contains all of the variables - /// for a stack frame. Inlined functions are represented as SBBlock objects - /// that have inlined function information: the name of the inlined function, - /// where it was called from. The block that is returned will be the first - /// block at or above the block for the PC (SBFrame::GetBlock()) that defines - /// the scope of the frame. When a function contains no inlined functions, - /// this will be the top most lexical block that defines the function. - /// When a function has inlined functions and the PC is currently - /// in one of those inlined functions, this method will return the inlined - /// block that defines this frame. If the PC isn't currently in an inlined - /// function, the lexical block that defines the function is returned. - ") GetFrameBlock; + Gets the lexical block that defines the stack frame. Another way to think + of this is it will return the block that contains all of the variables + for a stack frame. Inlined functions are represented as SBBlock objects + that have inlined function information: the name of the inlined function, + where it was called from. The block that is returned will be the first + block at or above the block for the PC (SBFrame::GetBlock()) that defines + the scope of the frame. When a function contains no inlined functions, + this will be the top most lexical block that defines the function. + When a function has inlined functions and the PC is currently + in one of those inlined functions, this method will return the inlined + block that defines this frame. If the PC isn't currently in an inlined + function, the lexical block that defines the function is returned.") GetFrameBlock; lldb::SBBlock GetFrameBlock () const; @@ -217,9 +210,8 @@ operator != (const lldb::SBFrame &rhs) const; %feature("docstring", " - /// The version that doesn't supply a 'use_dynamic' value will use the - /// target's default. - ") GetVariables; + The version that doesn't supply a 'use_dynamic' value will use the + target's default.") GetVariables; lldb::SBValueList GetVariables (bool arguments, bool locals, @@ -235,14 +227,13 @@ lldb::SBValueList GetVariables (const lldb::SBVariablesOptions& options); - + lldb::SBValueList GetRegisters (); %feature("docstring", " - /// The version that doesn't supply a 'use_dynamic' value will use the - /// target's default. - ") FindVariable; + The version that doesn't supply a 'use_dynamic' value will use the + target's default.") FindVariable; lldb::SBValue FindVariable (const char *var_name); @@ -253,40 +244,38 @@ FindRegister (const char *name); %feature("docstring", " - /// Get a lldb.SBValue for a variable path. - /// - /// Variable paths can include access to pointer or instance members: - /// rect_ptr->origin.y - /// pt.x - /// Pointer dereferences: - /// *this->foo_ptr - /// **argv - /// Address of: - /// &pt - /// &my_array[3].x - /// Array accesses and treating pointers as arrays: - /// int_array[1] - /// pt_ptr[22].x - /// - /// Unlike EvaluateExpression() which returns lldb.SBValue objects - /// with constant copies of the values at the time of evaluation, - /// the result of this function is a value that will continue to - /// track the current value of the value as execution progresses - /// in the current frame. - ") GetValueForVariablePath; + Get a lldb.SBValue for a variable path. + + Variable paths can include access to pointer or instance members: + rect_ptr->origin.y + pt.x + Pointer dereferences: + *this->foo_ptr + **argv + Address of: + &pt + &my_array[3].x + Array accesses and treating pointers as arrays: + int_array[1] + pt_ptr[22].x + + Unlike EvaluateExpression() which returns lldb.SBValue objects + with constant copies of the values at the time of evaluation, + the result of this function is a value that will continue to + track the current value of the value as execution progresses + in the current frame.") GetValueForVariablePath; lldb::SBValue GetValueForVariablePath (const char *var_path); - + lldb::SBValue GetValueForVariablePath (const char *var_path, lldb::DynamicValueType use_dynamic); %feature("docstring", " - /// Find variables, register sets, registers, or persistent variables using - /// the frame as the scope. - /// - /// The version that doesn't supply a 'use_dynamic' value will use the - /// target's default. - ") FindValue; + Find variables, register sets, registers, or persistent variables using + the frame as the scope. + + The version that doesn't supply a 'use_dynamic' value will use the + target's default.") FindValue; lldb::SBValue FindValue (const char *name, ValueType value_type); @@ -295,11 +284,11 @@ bool GetDescription (lldb::SBStream &description); - + %pythoncode %{ def get_all_variables(self): return self.GetVariables(True,True,True,True) - + def get_parent_frame(self): parent_idx = self.idx + 1 if parent_idx >= 0 and parent_idx < len(self.thread.frame): @@ -317,7 +306,7 @@ return self.GetVariables(False,False,True,False) def var(self, var_expr_path): - '''Calls through to lldb.SBFrame.GetValueForVariablePath() and returns + '''Calls through to lldb.SBFrame.GetValueForVariablePath() and returns a value that represents the variable expression path''' return self.GetValueForVariablePath(var_expr_path) Index: lldb/trunk/scripts/interface/SBFunction.i =================================================================== --- lldb/trunk/scripts/interface/SBFunction.i +++ lldb/trunk/scripts/interface/SBFunction.i @@ -40,8 +40,7 @@ func='%s [inlined]' % func_name] if frame.IsInlined() else func_name, file=file_name, line=line_num, args=get_args_as_string(frame, showFuncName=False)) - ... -") SBFunction; + ...") SBFunction; class SBFunction { public: @@ -59,7 +58,7 @@ const char * GetName() const; - + const char * GetDisplayName() const; @@ -89,7 +88,7 @@ lldb::SBBlock GetBlock (); - + lldb::LanguageType GetLanguage (); @@ -97,7 +96,7 @@ Returns true if the function was compiled with optimization. Optimization, in this case, is meant to indicate that the debugger experience may be confusing for the user -- variables optimized away, - stepping jumping between source lines -- and the driver may want to + stepping jumping between source lines -- and the driver may want to provide some guidance to the user about this. Returns false if unoptimized, or unknown.") GetIsOptimized; bool @@ -105,13 +104,13 @@ bool GetDescription (lldb::SBStream &description); - + bool operator == (const lldb::SBFunction &rhs) const; - + bool operator != (const lldb::SBFunction &rhs) const; - + %pythoncode %{ def get_instructions_from_current_target (self): return self.GetInstructions (target) @@ -121,7 +120,7 @@ __swig_getmethods__["end_addr"] = GetEndAddress if _newclass: end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this function.''') - + __swig_getmethods__["block"] = GetBlock if _newclass: block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the top level lexical block (lldb.SBBlock) for this function.''') Index: lldb/trunk/scripts/interface/SBHostOS.i =================================================================== --- lldb/trunk/scripts/interface/SBHostOS.i +++ lldb/trunk/scripts/interface/SBHostOS.i @@ -17,7 +17,7 @@ static lldb::SBFileSpec GetLLDBPythonPath (); - + static lldb::SBFileSpec GetLLDBPath (lldb::PathType path_type); Index: lldb/trunk/scripts/interface/SBInstruction.i =================================================================== --- lldb/trunk/scripts/interface/SBInstruction.i +++ lldb/trunk/scripts/interface/SBInstruction.i @@ -20,7 +20,7 @@ SBInstruction (); SBInstruction (const SBInstruction &rhs); - + ~SBInstruction (); bool @@ -31,19 +31,19 @@ lldb::SBAddress GetAddress(); - + const char * GetMnemonic (lldb::SBTarget target); - + const char * GetOperands (lldb::SBTarget target); - + const char * GetComment (lldb::SBTarget target); - + lldb::SBData GetData (lldb::SBTarget target); - + size_t GetByteSize (); @@ -67,10 +67,10 @@ bool DumpEmulation (const char * triple); // triple is to specify the architecture, e.g. 'armv6' or 'armv7-apple-ios' - + bool TestEmulation (lldb::SBStream &output_stream, const char *test_file); - + %pythoncode %{ def __mnemonic_property__ (self): return self.GetMnemonic (target) @@ -94,14 +94,14 @@ __swig_getmethods__["addr"] = GetAddress if _newclass: addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''') - + __swig_getmethods__["size"] = GetByteSize if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''') __swig_getmethods__["is_branch"] = DoesBranch if _newclass: is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''') %} - + }; Index: lldb/trunk/scripts/interface/SBInstructionList.i =================================================================== --- lldb/trunk/scripts/interface/SBInstructionList.i +++ lldb/trunk/scripts/interface/SBInstructionList.i @@ -31,7 +31,7 @@ SBInstructionList (); SBInstructionList (const SBInstructionList &rhs); - + ~SBInstructionList (); bool @@ -59,7 +59,7 @@ bool GetDescription (lldb::SBStream &description); - + bool DumpEmulationForAllInstructions (const char *triple); @@ -92,7 +92,7 @@ return closest_inst else: closest_inst = inst - return None + return None %} }; Index: lldb/trunk/scripts/interface/SBLanguageRuntime.i =================================================================== --- lldb/trunk/scripts/interface/SBLanguageRuntime.i +++ lldb/trunk/scripts/interface/SBLanguageRuntime.i @@ -13,7 +13,7 @@ public: static lldb::LanguageType GetLanguageTypeFromString (const char *string); - + static const char * GetNameForLanguageType (lldb::LanguageType language); }; Index: lldb/trunk/scripts/interface/SBLaunchInfo.i =================================================================== --- lldb/trunk/scripts/interface/SBLaunchInfo.i +++ lldb/trunk/scripts/interface/SBLaunchInfo.i @@ -90,10 +90,10 @@ void SetShell (const char * path); - + bool GetShellExpandArguments (); - + void SetShellExpandArguments (bool expand); Index: lldb/trunk/scripts/interface/SBLineEntry.i =================================================================== --- lldb/trunk/scripts/interface/SBLineEntry.i +++ lldb/trunk/scripts/interface/SBLineEntry.i @@ -71,35 +71,35 @@ void SetFileSpec (lldb::SBFileSpec filespec); - + void SetLine (uint32_t line); - + void SetColumn (uint32_t column); bool operator == (const lldb::SBLineEntry &rhs) const; - + bool operator != (const lldb::SBLineEntry &rhs) const; - + %pythoncode %{ __swig_getmethods__["file"] = GetFileSpec if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''') - + __swig_getmethods__["line"] = GetLine if _newclass: 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.''') - + __swig_getmethods__["column"] = GetColumn if _newclass: 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.''') - + __swig_getmethods__["addr"] = GetStartAddress if _newclass: 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.''') - + __swig_getmethods__["end_addr"] = GetEndAddress if _newclass: 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.''') - + %} }; Index: lldb/trunk/scripts/interface/SBListener.i =================================================================== --- lldb/trunk/scripts/interface/SBListener.i +++ lldb/trunk/scripts/interface/SBListener.i @@ -37,14 +37,14 @@ uint32_t StartListeningForEventClass (SBDebugger &debugger, - const char *broadcaster_class, + const char *broadcaster_class, uint32_t event_mask); - + uint32_t StopListeningForEventClass (SBDebugger &debugger, const char *broadcaster_class, uint32_t event_mask); - + uint32_t StartListeningForEvents (const lldb::SBBroadcaster& broadcaster, uint32_t event_mask); Index: lldb/trunk/scripts/interface/SBModule.i =================================================================== --- lldb/trunk/scripts/interface/SBModule.i +++ lldb/trunk/scripts/interface/SBModule.i @@ -119,10 +119,10 @@ SBModule (); SBModule (const lldb::SBModule &rhs); - + SBModule (const lldb::SBModuleSpec &module_spec); - - SBModule (lldb::SBProcess &process, + + SBModule (lldb::SBProcess &process, lldb::addr_t header_addr); ~SBModule (); @@ -136,43 +136,37 @@ Clear(); %feature("docstring", " - //------------------------------------------------------------------ - /// Get const accessor for the module file specification. - /// - /// This function returns the file for the module on the host system - /// that is running LLDB. This can differ from the path on the - /// platform since we might be doing remote debugging. - /// - /// @return - /// A const reference to the file specification object. - //------------------------------------------------------------------ - ") GetFileSpec; + Get const accessor for the module file specification. + + This function returns the file for the module on the host system + that is running LLDB. This can differ from the path on the + platform since we might be doing remote debugging. + + @return + A const reference to the file specification object.") GetFileSpec; lldb::SBFileSpec GetFileSpec () const; %feature("docstring", " - //------------------------------------------------------------------ - /// Get accessor for the module platform file specification. - /// - /// Platform file refers to the path of the module as it is known on - /// the remote system on which it is being debugged. For local - /// debugging this is always the same as Module::GetFileSpec(). But - /// remote debugging might mention a file '/usr/lib/liba.dylib' - /// which might be locally downloaded and cached. In this case the - /// platform file could be something like: - /// '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib' - /// The file could also be cached in a local developer kit directory. - /// - /// @return - /// A const reference to the file specification object. - //------------------------------------------------------------------ - ") GetPlatformFileSpec; + Get accessor for the module platform file specification. + + Platform file refers to the path of the module as it is known on + the remote system on which it is being debugged. For local + debugging this is always the same as Module::GetFileSpec(). But + remote debugging might mention a file '/usr/lib/liba.dylib' + which might be locally downloaded and cached. In this case the + platform file could be something like: + '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib' + The file could also be cached in a local developer kit directory. + + @return + A const reference to the file specification object.") GetPlatformFileSpec; lldb::SBFileSpec GetPlatformFileSpec () const; bool SetPlatformFileSpec (const lldb::SBFileSpec &platform_file); - + lldb::SBFileSpec GetRemoteInstallFileSpec (); @@ -195,7 +189,7 @@ ResolveFileAddress (lldb::addr_t vm_addr); lldb::SBSymbolContext - ResolveSymbolContextForAddress (const lldb::SBAddress& addr, + ResolveSymbolContextForAddress (const lldb::SBAddress& addr, uint32_t resolve_scope); bool @@ -208,25 +202,22 @@ GetCompileUnitAtIndex (uint32_t); %feature("docstring", " - //------------------------------------------------------------------ - /// Find compile units related to *this module and passed source - /// file. - /// - /// @param[in] sb_file_spec - /// A lldb::SBFileSpec object that contains source file - /// specification. - /// - /// @return - /// A lldb::SBSymbolContextList that gets filled in with all of - /// the symbol contexts for all the matches. - //------------------------------------------------------------------ - ") FindCompileUnits; + Find compile units related to *this module and passed source + file. + + @param[in] sb_file_spec + A lldb::SBFileSpec object that contains source file + specification. + + @return + A lldb::SBSymbolContextList that gets filled in with all of + the symbol contexts for all the matches.") FindCompileUnits; lldb::SBSymbolContextList FindCompileUnits (const lldb::SBFileSpec &sb_file_spec); size_t GetNumSymbols (); - + lldb::SBSymbol GetSymbolAtIndex (size_t idx); @@ -237,7 +228,7 @@ lldb::SBSymbolContextList FindSymbols (const char *name, lldb::SymbolType type = eSymbolTypeAny); - + size_t GetNumSections (); @@ -247,28 +238,25 @@ %feature("docstring", " - //------------------------------------------------------------------ - /// Find functions by name. - /// - /// @param[in] name - /// The name of the function we are looking for. - /// - /// @param[in] name_type_mask - /// A logical OR of one or more FunctionNameType enum bits that - /// indicate what kind of names should be used when doing the - /// lookup. Bits include fully qualified names, base names, - /// C++ methods, or ObjC selectors. - /// See FunctionNameType for more details. - /// - /// @return - /// A symbol context list that gets filled in with all of the - /// matches. - //------------------------------------------------------------------ - ") FindFunctions; + Find functions by name. + + @param[in] name + The name of the function we are looking for. + + @param[in] name_type_mask + A logical OR of one or more FunctionNameType enum bits that + indicate what kind of names should be used when doing the + lookup. Bits include fully qualified names, base names, + C++ methods, or ObjC selectors. + See FunctionNameType for more details. + + @return + A symbol context list that gets filled in with all of the + matches.") FindFunctions; lldb::SBSymbolContextList - FindFunctions (const char *name, + FindFunctions (const char *name, uint32_t name_type_mask = lldb::eFunctionNameTypeAny); - + lldb::SBType FindFirstType (const char* name); @@ -282,76 +270,67 @@ GetBasicType(lldb::BasicType type); %feature("docstring", " - //------------------------------------------------------------------ - /// Get all types matching \a type_mask from debug info in this - /// module. - /// - /// @param[in] type_mask - /// A bitfield that consists of one or more bits logically OR'ed - /// together from the lldb::TypeClass enumeration. This allows - /// you to request only structure types, or only class, struct - /// and union types. Passing in lldb::eTypeClassAny will return - /// all types found in the debug information for this module. - /// - /// @return - /// A list of types in this module that match \a type_mask - //------------------------------------------------------------------ - ") GetTypes; + Get all types matching \a type_mask from debug info in this + module. + + @param[in] type_mask + A bitfield that consists of one or more bits logically OR'ed + together from the lldb::TypeClass enumeration. This allows + you to request only structure types, or only class, struct + and union types. Passing in lldb::eTypeClassAny will return + all types found in the debug information for this module. + + @return + A list of types in this module that match \a type_mask") GetTypes; lldb::SBTypeList GetTypes (uint32_t type_mask = lldb::eTypeClassAny); %feature("docstring", " - //------------------------------------------------------------------ - /// Find global and static variables by name. - /// - /// @param[in] target - /// A valid SBTarget instance representing the debuggee. - /// - /// @param[in] name - /// The name of the global or static variable we are looking - /// for. - /// - /// @param[in] max_matches - /// Allow the number of matches to be limited to \a max_matches. - /// - /// @return - /// A list of matched variables in an SBValueList. - //------------------------------------------------------------------ - ") FindGlobalVariables; + Find global and static variables by name. + + @param[in] target + A valid SBTarget instance representing the debuggee. + + @param[in] name + The name of the global or static variable we are looking + for. + + @param[in] max_matches + Allow the number of matches to be limited to \a max_matches. + + @return + A list of matched variables in an SBValueList.") FindGlobalVariables; lldb::SBValueList - FindGlobalVariables (lldb::SBTarget &target, - const char *name, + FindGlobalVariables (lldb::SBTarget &target, + const char *name, uint32_t max_matches); - + %feature("docstring", " - //------------------------------------------------------------------ - /// Find the first global (or static) variable by name. - /// - /// @param[in] target - /// A valid SBTarget instance representing the debuggee. - /// - /// @param[in] name - /// The name of the global or static variable we are looking - /// for. - /// - /// @return - /// An SBValue that gets filled in with the found variable (if any). - //------------------------------------------------------------------ - ") FindFirstGlobalVariable; + Find the first global (or static) variable by name. + + @param[in] target + A valid SBTarget instance representing the debuggee. + + @param[in] name + The name of the global or static variable we are looking + for. + + @return + An SBValue that gets filled in with the found variable (if any).") FindFirstGlobalVariable; lldb::SBValue FindFirstGlobalVariable (lldb::SBTarget &target, const char *name); - + lldb::ByteOrder GetByteOrder (); - + uint32_t GetAddressByteSize(); - + const char * GetTriple (); - + uint32_t - GetVersion (uint32_t *versions, + GetVersion (uint32_t *versions, uint32_t num_versions); lldb::SBFileSpec @@ -365,10 +344,10 @@ bool operator == (const lldb::SBModule &rhs) const; - + bool operator != (const lldb::SBModule &rhs) const; - + %pythoncode %{ def __len__(self): '''Return the number of symbols in a lldb.SBModule object.''' @@ -398,12 +377,12 @@ '''A helper object that will lazily hand out lldb.SBSymbol objects for a module when supplied an index, name, or regular expression.''' def __init__(self, sbmodule): self.sbmodule = sbmodule - + def __len__(self): if self.sbmodule: return int(self.sbmodule.GetNumSymbols()) return 0 - + def __getitem__(self, key): count = len(self) if type(key) is int: @@ -438,15 +417,15 @@ else: print("error: unsupported item type: %s" % type(key)) return None - + def get_symbols_access_object(self): '''An accessor function that returns a symbols_access() object which allows lazy symbol access from a lldb.SBModule object.''' return self.symbols_access (self) - + def get_compile_units_access_object (self): '''An accessor function that returns a compile_units_access() object which allows lazy compile unit access from a lldb.SBModule object.''' return self.compile_units_access (self) - + def get_symbols_array(self): '''An accessor function that returns a list() that contains all symbols in a lldb.SBModule object.''' symbols = [] @@ -459,12 +438,12 @@ '''A helper object that will lazily hand out lldb.SBSection objects for a module when supplied an index, name, or regular expression.''' def __init__(self, sbmodule): self.sbmodule = sbmodule - + def __len__(self): if self.sbmodule: return int(self.sbmodule.GetNumSections()) return 0 - + def __getitem__(self, key): count = len(self) if type(key) is int: @@ -494,12 +473,12 @@ '''A helper object that will lazily hand out lldb.SBCompileUnit objects for a module when supplied an index, full or partial path, or regular expression.''' def __init__(self, sbmodule): self.sbmodule = sbmodule - + def __len__(self): if self.sbmodule: return int(self.sbmodule.GetNumCompileUnits()) return 0 - + def __getitem__(self, key): count = len(self) if type(key) is int: @@ -532,7 +511,7 @@ def get_sections_access_object(self): '''An accessor function that returns a sections_access() object which allows lazy section array access.''' return self.sections_access (self) - + def get_sections_array(self): '''An accessor function that returns an array object that contains all sections in this module object.''' if not hasattr(self, 'sections_array'): @@ -569,31 +548,31 @@ def get_uuid(self): return uuid.UUID (self.GetUUIDString()) - + __swig_getmethods__["uuid"] = get_uuid if _newclass: uuid = property(get_uuid, None, doc='''A read only property that returns a standard python uuid.UUID object that represents the UUID of this module.''') - + __swig_getmethods__["file"] = GetFileSpec if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented where it is being debugged.''') - + __swig_getmethods__["platform_file"] = GetPlatformFileSpec if _newclass: platform_file = property(GetPlatformFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented on the current host system.''') - + __swig_getmethods__["byte_order"] = GetByteOrder if _newclass: byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this module.''') - + __swig_getmethods__["addr_size"] = GetAddressByteSize if _newclass: addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this module.''') - + __swig_getmethods__["triple"] = GetTriple if _newclass: triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this module.''') __swig_getmethods__["num_symbols"] = GetNumSymbols if _newclass: num_symbols = property(GetNumSymbols, None, doc='''A read only property that returns number of symbols in the module symbol table as an integer.''') - + __swig_getmethods__["num_sections"] = GetNumSections if _newclass: num_sections = property(GetNumSections, None, doc='''A read only property that returns number of sections in the module as an integer.''') - + %} }; Index: lldb/trunk/scripts/interface/SBModuleSpec.i =================================================================== --- lldb/trunk/scripts/interface/SBModuleSpec.i +++ lldb/trunk/scripts/interface/SBModuleSpec.i @@ -11,92 +11,86 @@ class SBModuleSpec { public: - + SBModuleSpec (); - + SBModuleSpec (const lldb::SBModuleSpec &rhs); - + ~SBModuleSpec (); - + bool IsValid () const; explicit operator bool() const; - + void Clear(); - + %feature("docstring", " - //------------------------------------------------------------------ - /// Get const accessor for the module file. - /// - /// This function returns the file for the module on the host system - /// that is running LLDB. This can differ from the path on the - /// platform since we might be doing remote debugging. - /// - /// @return - /// A const reference to the file specification object. - //------------------------------------------------------------------ - ") GetFileSpec; + Get const accessor for the module file. + + This function returns the file for the module on the host system + that is running LLDB. This can differ from the path on the + platform since we might be doing remote debugging. + + @return + A const reference to the file specification object.") GetFileSpec; lldb::SBFileSpec GetFileSpec (); - + void SetFileSpec (const lldb::SBFileSpec &fspec); - + %feature("docstring", " - //------------------------------------------------------------------ - /// Get accessor for the module platform file. - /// - /// Platform file refers to the path of the module as it is known on - /// the remote system on which it is being debugged. For local - /// debugging this is always the same as Module::GetFileSpec(). But - /// remote debugging might mention a file '/usr/lib/liba.dylib' - /// which might be locally downloaded and cached. In this case the - /// platform file could be something like: - /// '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib' - /// The file could also be cached in a local developer kit directory. - /// - /// @return - /// A const reference to the file specification object. - //------------------------------------------------------------------ - ") GetPlatformFileSpec; + Get accessor for the module platform file. + + Platform file refers to the path of the module as it is known on + the remote system on which it is being debugged. For local + debugging this is always the same as Module::GetFileSpec(). But + remote debugging might mention a file '/usr/lib/liba.dylib' + which might be locally downloaded and cached. In this case the + platform file could be something like: + '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib' + The file could also be cached in a local developer kit directory. + + @return + A const reference to the file specification object.") GetPlatformFileSpec; lldb::SBFileSpec GetPlatformFileSpec (); - + void SetPlatformFileSpec (const lldb::SBFileSpec &fspec); - + lldb::SBFileSpec GetSymbolFileSpec (); - + void SetSymbolFileSpec (const lldb::SBFileSpec &fspec); - + const char * GetObjectName (); - + void SetObjectName (const char *name); - + const char * GetTriple (); - + void SetTriple (const char *triple); - + const uint8_t * GetUUIDBytes (); - + size_t GetUUIDLength (); - + bool SetUUIDBytes (const uint8_t *uuid, size_t uuid_len); - + bool GetDescription (lldb::SBStream &description); - + }; @@ -104,32 +98,32 @@ { public: SBModuleSpecList(); - + SBModuleSpecList (const SBModuleSpecList &rhs); - + ~SBModuleSpecList(); - + static SBModuleSpecList GetModuleSpecifications (const char *path); - + void Append (const lldb::SBModuleSpec &spec); - + void Append (const lldb::SBModuleSpecList &spec_list); lldb::SBModuleSpec FindFirstMatchingSpec (const lldb::SBModuleSpec &match_spec); - + lldb::SBModuleSpecList FindMatchingSpecs (const lldb::SBModuleSpec &match_spec); - + size_t GetSize(); - + lldb::SBModuleSpec GetSpecAtIndex (size_t i); - + bool GetDescription (lldb::SBStream &description); Index: lldb/trunk/scripts/interface/SBPlatform.i =================================================================== --- lldb/trunk/scripts/interface/SBPlatform.i +++ lldb/trunk/scripts/interface/SBPlatform.i @@ -8,36 +8,36 @@ namespace lldb { - + class SBPlatformConnectOptions { public: SBPlatformConnectOptions (const char *url); - + SBPlatformConnectOptions (const SBPlatformConnectOptions &rhs); - + ~SBPlatformConnectOptions (); - + const char * GetURL(); - + void SetURL(const char *url); - + bool GetRsyncEnabled(); - + void EnableRsync (const char *options, const char *remote_path_prefix, bool omit_remote_hostname); - + void DisableRsync (); - + const char * GetLocalCacheDirectory(); - + void SetLocalCacheDirectory(const char *path); }; @@ -46,11 +46,11 @@ { public: SBPlatformShellCommand (const char *shell_command); - + SBPlatformShellCommand (const SBPlatformShellCommand &rhs); - + ~SBPlatformShellCommand(); - + void Clear(); @@ -59,7 +59,7 @@ void SetCommand(const char *shell_command); - + const char * GetWorkingDirectory (); @@ -68,16 +68,16 @@ uint32_t GetTimeoutSeconds (); - + void SetTimeoutSeconds (uint32_t sec); - + int GetSignal (); - + int GetStatus (); - + const char * GetOutput (); }; @@ -90,7 +90,7 @@ to remotely launch and attach to processes, upload/download files, create directories, run remote shell commands, find locally cached versions of files from the remote system, and much more. - + SBPlatform objects can be created and then used to connect to a remote platform which allows the SBPlatform to be used to get a list of the current processes on the remote host, attach to one of those processes, @@ -103,7 +103,7 @@ as the currently selected platform matches the target architecture and executable type. If the architecture or executable type do not match, a suitable platform will be found automatically." - + ) SBPlatform; class SBPlatform { @@ -114,7 +114,7 @@ SBPlatform (const char *); ~SBPlatform(); - + bool IsValid () const; @@ -125,52 +125,52 @@ const char * GetWorkingDirectory(); - + bool SetWorkingDirectory(const char *); const char * GetName (); - + SBError ConnectRemote (lldb::SBPlatformConnectOptions &connect_options); - + void DisconnectRemote (); bool IsConnected(); - + const char * GetTriple(); - + const char * GetHostname (); - + const char * GetOSBuild (); - + const char * GetOSDescription (); - + uint32_t GetOSMajorVersion (); - + uint32_t GetOSMinorVersion (); - + uint32_t GetOSUpdateVersion (); - + lldb::SBError Get (lldb::SBFileSpec &src, lldb::SBFileSpec &dst); lldb::SBError Put (lldb::SBFileSpec &src, lldb::SBFileSpec &dst); - + lldb::SBError Install (lldb::SBFileSpec &src, lldb::SBFileSpec &dst); - + lldb::SBError Run (lldb::SBPlatformShellCommand &shell_command); @@ -182,10 +182,10 @@ lldb::SBError MakeDirectory (const char *path, uint32_t file_permissions = lldb::eFilePermissionsDirectoryDefault); - + uint32_t GetFilePermissions (const char *path); - + lldb::SBError SetFilePermissions (const char *path, uint32_t file_permissions); Index: lldb/trunk/scripts/interface/SBProcess.i =================================================================== --- lldb/trunk/scripts/interface/SBProcess.i +++ lldb/trunk/scripts/interface/SBProcess.i @@ -55,10 +55,10 @@ const char * GetPluginName (); - + const char * GetShortPluginName (); - + void Clear (); @@ -75,30 +75,27 @@ %feature("autodoc", " Writes data into the current process's stdin. API client specifies a Python - string as the only argument. - ") PutSTDIN; + string as the only argument.") PutSTDIN; size_t PutSTDIN (const char *src, size_t src_len); %feature("autodoc", " Reads data from the current process's stdout stream. API client specifies the size of the buffer to read data into. It returns the byte buffer in a - Python string. - ") GetSTDOUT; + Python string.") GetSTDOUT; size_t GetSTDOUT (char *dst, size_t dst_len) const; %feature("autodoc", " Reads data from the current process's stderr stream. API client specifies the size of the buffer to read data into. It returns the byte buffer in a - Python string. - ") GetSTDERR; + Python string.") GetSTDERR; size_t GetSTDERR (char *dst, size_t dst_len) const; size_t GetAsyncProfileData(char *dst, size_t dst_len) const; - + void ReportEventState (const lldb::SBEvent &event, FILE *out) const; @@ -106,16 +103,13 @@ AppendEventStateReport (const lldb::SBEvent &event, lldb::SBCommandReturnObject &result); %feature("docstring", " - //------------------------------------------------------------------ - /// Remote connection related functions. These will fail if the - /// process is not in eStateConnected. They are intended for use - /// when connecting to an externally managed debugserver instance. - //------------------------------------------------------------------ - ") RemoteAttachToProcessWithID; + Remote connection related functions. These will fail if the + process is not in eStateConnected. They are intended for use + when connecting to an externally managed debugserver instance.") RemoteAttachToProcessWithID; bool RemoteAttachToProcessWithID (lldb::pid_t pid, lldb::SBError& error); - + %feature("docstring", "See SBTarget.Launch for argument description and usage." ) RemoteLaunch; @@ -129,7 +123,7 @@ uint32_t launch_flags, bool stop_at_entry, lldb::SBError& error); - + //------------------------------------------------------------------ // Thread related functions //------------------------------------------------------------------ @@ -140,32 +134,27 @@ Returns the INDEX'th thread from the list of current threads. The index of a thread is only valid for the current stop. For a persistent thread identifier use either the thread ID or the IndexID. See help on SBThread - for more details. - ") GetThreadAtIndex; + for more details.") GetThreadAtIndex; lldb::SBThread GetThreadAtIndex (size_t index); %feature("autodoc", " - Returns the thread with the given thread ID. - ") GetThreadByID; + Returns the thread with the given thread ID.") GetThreadByID; lldb::SBThread GetThreadByID (lldb::tid_t sb_thread_id); - + %feature("autodoc", " - Returns the thread with the given thread IndexID. - ") GetThreadByIndexID; + Returns the thread with the given thread IndexID.") GetThreadByIndexID; lldb::SBThread GetThreadByIndexID (uint32_t index_id); %feature("autodoc", " - Returns the currently selected thread. - ") GetSelectedThread; + Returns the currently selected thread.") GetSelectedThread; lldb::SBThread GetSelectedThread () const; %feature("autodoc", " - Lazily create a thread on demand through the current OperatingSystem plug-in, if the current OperatingSystem plug-in supports it. - ") CreateOSPluginThread; + Lazily create a thread on demand through the current OperatingSystem plug-in, if the current OperatingSystem plug-in supports it.") CreateOSPluginThread; lldb::SBThread CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context); @@ -177,7 +166,7 @@ bool SetSelectedThreadByIndexID (uint32_t index_id); - + //------------------------------------------------------------------ // Queue related functions //------------------------------------------------------------------ @@ -201,14 +190,12 @@ GetExitDescription (); %feature("autodoc", " - Returns the process ID of the process. - ") GetProcessID; + Returns the process ID of the process.") GetProcessID; lldb::pid_t GetProcessID (); - + %feature("autodoc", " - Returns an integer ID that is guaranteed to be unique across all process instances. This is not the process ID, just a unique integer for comparison and caching purposes. - ") GetUniqueID; + Returns an integer ID that is guaranteed to be unique across all process instances. This is not the process ID, just a unique integer for comparison and caching purposes.") GetUniqueID; uint32_t GetUniqueID(); @@ -217,8 +204,7 @@ %feature("docstring", " Kills the process and shuts down all threads that were spawned to - track and monitor process. - ") Destroy; + track and monitor process.") Destroy; lldb::SBError Destroy (); @@ -247,14 +233,13 @@ include_expression_stops is true, then stops caused by expression evaluation will cause the returned value to increase, otherwise the counter returned will only increase when execution is continued explicitly by the user. Note, the value - will always increase, but may increase by more than one per stop. - ") GetStopID; + will always increase, but may increase by more than one per stop.") GetStopID; uint32_t GetStopID(bool include_expression_stops = false); - + void SendAsyncInterrupt(); - + %feature("autodoc", " Reads memory from the current process's address space and removes any traps that may have been inserted into the memory. It returns the byte @@ -262,8 +247,7 @@ # Read 4 bytes from address 'addr' and assume error.Success() is True. content = process.ReadMemory(addr, 4, error) - new_bytes = bytearray(content) - ") ReadMemory; + new_bytes = bytearray(content)") ReadMemory; size_t ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error); @@ -275,8 +259,7 @@ new_value = str(bytes) result = process.WriteMemory(addr, new_value, error) if not error.Success() or result != len(bytes): - print('SBProcess.WriteMemory() failed!') - ") WriteMemory; + print('SBProcess.WriteMemory() failed!')") WriteMemory; size_t WriteMemory (addr_t addr, const void *buf, size_t size, lldb::SBError &error); @@ -284,23 +267,22 @@ Reads a NULL terminated C string from the current process's address space. It returns a python string of the exact length, or truncates the string if the maximum character limit is reached. Example: - - # Read a C string of at most 256 bytes from address '0x1000' + + # Read a C string of at most 256 bytes from address '0x1000' error = lldb.SBError() cstring = process.ReadCStringFromMemory(0x1000, 256, error) if error.Success(): print('cstring: ', cstring) else - print('error: ', error) - ") ReadCStringFromMemory; + print('error: ', error)") ReadCStringFromMemory; size_t ReadCStringFromMemory (addr_t addr, void *char_buf, size_t size, lldb::SBError &error); %feature("autodoc", " - Reads an unsigned integer from memory given a byte size and an address. + Reads an unsigned integer from memory given a byte size and an address. Returns the unsigned integer that was read. Example: - + # Read a 4 byte unsigned integer from address 0x1000 error = lldb.SBError() uint = ReadUnsignedFromMemory(0x1000, 4, error) @@ -308,15 +290,14 @@ print('integer: %u' % uint) else print('error: ', error) - - ") ReadUnsignedFromMemory; +") ReadUnsignedFromMemory; uint64_t ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBError &error); - + %feature("autodoc", " Reads a pointer from memory from an address and returns the value. Example: - + # Read a pointer from address 0x1000 error = lldb.SBError() ptr = ReadPointerFromMemory(0x1000, error) @@ -324,12 +305,11 @@ print('pointer: 0x%x' % ptr) else print('error: ', error) - - ") ReadPointerFromMemory; - +") ReadPointerFromMemory; + lldb::addr_t ReadPointerFromMemory (addr_t addr, lldb::SBError &error); - + // Events static lldb::StateType @@ -340,7 +320,7 @@ static size_t GetNumRestartedReasonsFromEvent (const lldb::SBEvent &event); - + static const char * GetRestartedReasonAtIndexFromEvent (const lldb::SBEvent &event, size_t idx); @@ -370,23 +350,22 @@ uint32_t LoadImage (lldb::SBFileSpec &image_spec, lldb::SBError &error); - + %feature("autodoc", " Load the library whose filename is given by image_spec looking in all the paths supplied in the paths argument. If successful, return a token that can be passed to UnloadImage and fill loaded_path with the path that was - successfully loaded. On failure, return - lldb.LLDB_INVALID_IMAGE_TOKEN. - ") LoadImageUsingPaths; - uint32_t + successfully loaded. On failure, return + lldb.LLDB_INVALID_IMAGE_TOKEN.") LoadImageUsingPaths; + uint32_t LoadImageUsingPaths(const lldb::SBFileSpec &image_spec, SBStringList &paths, - lldb::SBFileSpec &loaded_path, + lldb::SBFileSpec &loaded_path, SBError &error); lldb::SBError UnloadImage (uint32_t image_token); - + lldb::SBError SendEventData (const char *event_data); @@ -395,24 +374,22 @@ this process can support as a uint32_t. When the process is stopped and you have an SBThread, lldb may be able to show a backtrace of when that thread was originally created, - or the work item was enqueued to it (in the case of a libdispatch - queue). - ") GetNumExtendedBacktraceTypes; - + or the work item was enqueued to it (in the case of a libdispatch + queue).") GetNumExtendedBacktraceTypes; + uint32_t GetNumExtendedBacktraceTypes (); %feature("autodoc", " - Takes an index argument, returns the name of one of the thread-origin - extended backtrace methods as a str. - ") GetExtendedBacktraceTypeAtIndex; + Takes an index argument, returns the name of one of the thread-origin + extended backtrace methods as a str.") GetExtendedBacktraceTypeAtIndex; const char * GetExtendedBacktraceTypeAtIndex (uint32_t idx); lldb::SBThreadCollection GetHistoryThreads (addr_t addr); - + bool IsInstrumentationRuntimePresent(lldb::InstrumentationRuntimeType type); @@ -435,8 +412,7 @@ process_info = process.GetProcessInfo() if process_info.IsValid(): - process_info.GetProcessID() - ") GetProcessInfo; + process_info.GetProcessID()") GetProcessInfo; lldb::SBProcessInfo GetProcessInfo(); @@ -444,12 +420,12 @@ def __get_is_alive__(self): '''Returns "True" if the process is currently alive, "False" otherwise''' s = self.GetState() - if (s == eStateAttaching or - s == eStateLaunching or - s == eStateStopped or - s == eStateRunning or - s == eStateStepping or - s == eStateCrashed or + if (s == eStateAttaching or + s == eStateLaunching or + s == eStateStopped or + s == eStateRunning or + s == eStateStepping or + s == eStateCrashed or s == eStateSuspended): return True return False @@ -472,21 +448,21 @@ '''A helper object that will lazily hand out thread for a process when supplied an index.''' def __init__(self, sbprocess): self.sbprocess = sbprocess - + def __len__(self): if self.sbprocess: return int(self.sbprocess.GetNumThreads()) return 0 - + def __getitem__(self, key): if type(key) is int and key < len(self): return self.sbprocess.GetThreadAtIndex(key) return None - + def get_threads_access_object(self): '''An accessor function that returns a modules_access() object which allows lazy thread access from a lldb.SBProcess object.''' return self.threads_access (self) - + def get_process_thread_list(self): '''An accessor function that returns a list() that contains all threads in a lldb.SBProcess object.''' threads = [] @@ -498,15 +474,15 @@ def __iter__(self): '''Iterate over all threads in a lldb.SBProcess object.''' return lldb_iter(self, 'GetNumThreads', 'GetThreadAtIndex') - + def __len__(self): '''Return the number of threads in a lldb.SBProcess object.''' return self.GetNumThreads() - + __swig_getmethods__["threads"] = get_process_thread_list if _newclass: threads = property(get_process_thread_list, None, doc='''A read only property that returns a list() of lldb.SBThread objects for this process.''') - + __swig_getmethods__["thread"] = get_threads_access_object if _newclass: thread = property(get_threads_access_object, None, doc='''A read only property that returns an object that can access threads by thread index (thread = lldb.process.thread[12]).''') @@ -521,26 +497,26 @@ __swig_getmethods__["id"] = GetProcessID if _newclass: id = property(GetProcessID, None, doc='''A read only property that returns the process ID as an integer.''') - + __swig_getmethods__["target"] = GetTarget if _newclass: target = property(GetTarget, None, doc='''A read only property that an lldb object that represents the target (lldb.SBTarget) that owns this process.''') - + __swig_getmethods__["num_threads"] = GetNumThreads if _newclass: num_threads = property(GetNumThreads, None, doc='''A read only property that returns the number of threads in this process as an integer.''') - + __swig_getmethods__["selected_thread"] = GetSelectedThread __swig_setmethods__["selected_thread"] = SetSelectedThread if _newclass: selected_thread = property(GetSelectedThread, SetSelectedThread, doc='''A read/write property that gets/sets the currently selected thread in this process. The getter returns a lldb.SBThread object and the setter takes an lldb.SBThread object.''') - + __swig_getmethods__["state"] = GetState if _newclass: state = property(GetState, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eState") that represents the current state of this process (running, stopped, exited, etc.).''') - + __swig_getmethods__["exit_state"] = GetExitStatus if _newclass: exit_state = property(GetExitStatus, None, doc='''A read only property that returns an exit status as an integer of this process when the process state is lldb.eStateExited.''') - + __swig_getmethods__["exit_description"] = GetExitDescription if _newclass: 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.''') - + __swig_getmethods__["broadcaster"] = GetBroadcaster if _newclass: broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this process.''') %} Index: lldb/trunk/scripts/interface/SBQueue.i =================================================================== --- lldb/trunk/scripts/interface/SBQueue.i +++ lldb/trunk/scripts/interface/SBQueue.i @@ -14,7 +14,7 @@ SBQueue (); SBQueue (const lldb::QueueSP& queue_sp); - + ~SBQueue(); bool @@ -32,8 +32,7 @@ Returns an lldb::queue_id_t type unique identifier number for this queue that will not be used by any other queue during this process' execution. These ID numbers often start at 1 with the first - system-created queues and increment from there. - ") + system-created queues and increment from there.") GetQueueID; lldb::queue_id_t @@ -43,10 +42,9 @@ GetName () const; %feature("autodoc", " - Returns an lldb::QueueKind enumerated value (e.g. eQueueKindUnknown, + Returns an lldb::QueueKind enumerated value (e.g. eQueueKindUnknown, eQueueKindSerial, eQueueKindConcurrent) describing the type of this - queue. - ") + queue.") GetKind(); lldb::QueueKind Index: lldb/trunk/scripts/interface/SBQueueItem.i =================================================================== --- lldb/trunk/scripts/interface/SBQueueItem.i +++ lldb/trunk/scripts/interface/SBQueueItem.i @@ -14,7 +14,7 @@ SBQueueItem (); SBQueueItem (const lldb::QueueItemSP& queue_item_sp); - + ~SBQueueItem(); bool Index: lldb/trunk/scripts/interface/SBSection.i =================================================================== --- lldb/trunk/scripts/interface/SBSection.i +++ lldb/trunk/scripts/interface/SBSection.i @@ -71,7 +71,7 @@ lldb::addr_t GetLoadAddress (lldb::SBTarget &target); - + lldb::addr_t GetByteSize (); @@ -80,7 +80,7 @@ uint64_t GetFileByteSize (); - + lldb::SBData GetSectionData (); @@ -95,28 +95,25 @@ GetPermissions() const; %feature("docstring", " - //------------------------------------------------------------------ - /// Return the size of a target's byte represented by this section - /// in numbers of host bytes. Note that certain architectures have - /// varying minimum addressable unit (i.e. byte) size for their - /// CODE or DATA buses. - /// - /// @return - /// The number of host (8-bit) bytes needed to hold a target byte - //------------------------------------------------------------------ - ") GetTargetByteSize; + Return the size of a target's byte represented by this section + in numbers of host bytes. Note that certain architectures have + varying minimum addressable unit (i.e. byte) size for their + CODE or DATA buses. + + @return + The number of host (8-bit) bytes needed to hold a target byte") GetTargetByteSize; uint32_t GetTargetByteSize (); bool GetDescription (lldb::SBStream &description); - + bool operator == (const lldb::SBSection &rhs); bool operator != (const lldb::SBSection &rhs); - + %pythoncode %{ def __iter__(self): '''Iterate over all subsections in a lldb.SBSection object.''' Index: lldb/trunk/scripts/interface/SBSourceManager.i =================================================================== --- lldb/trunk/scripts/interface/SBSourceManager.i +++ lldb/trunk/scripts/interface/SBSourceManager.i @@ -25,20 +25,19 @@ '=>', # prefix for current line stream) - # 2 + # 2 # 3 int main(int argc, char const *argv[]) { # => 4 printf('Hello world.\\n'); // Set break point at this line. # 5 return 0; # 6 } self.expect(stream.GetData(), 'Source code displayed correctly', exe=False, - patterns = ['=> %d.*Hello world' % self.line]) -") SBSourceManager; + patterns = ['=> %d.*Hello world' % self.line])") SBSourceManager; class SBSourceManager { public: SBSourceManager (const lldb::SBSourceManager &rhs); - + ~SBSourceManager(); size_t Index: lldb/trunk/scripts/interface/SBStream.i =================================================================== --- lldb/trunk/scripts/interface/SBStream.i +++ lldb/trunk/scripts/interface/SBStream.i @@ -28,21 +28,20 @@ '=>', # prefix for current line stream) - # 2 + # 2 # 3 int main(int argc, char const *argv[]) { # => 4 printf('Hello world.\\n'); // Set break point at this line. # 5 return 0; # 6 } self.expect(stream.GetData(), 'Source code displayed correctly', exe=False, - patterns = ['=> %d.*Hello world' % self.line]) -") SBStream; + patterns = ['=> %d.*Hello world' % self.line])") SBStream; class SBStream { public: SBStream (); - + ~SBStream (); bool @@ -51,21 +50,15 @@ explicit operator bool() const; %feature("docstring", " - //-------------------------------------------------------------------------- - /// If this stream is not redirected to a file, it will maintain a local - /// cache for the stream data which can be accessed using this accessor. - //-------------------------------------------------------------------------- - ") GetData; + If this stream is not redirected to a file, it will maintain a local + cache for the stream data which can be accessed using this accessor.") GetData; const char * GetData (); %feature("docstring", " - //-------------------------------------------------------------------------- - /// If this stream is not redirected to a file, it will maintain a local - /// cache for the stream output whose length can be accessed using this - /// accessor. - //-------------------------------------------------------------------------- - ") GetSize; + If this stream is not redirected to a file, it will maintain a local + cache for the stream output whose length can be accessed using this + accessor.") GetSize; size_t GetSize(); @@ -77,7 +70,7 @@ self->Printf("%s", str); } } - + void RedirectToFile (const char *path, bool append); @@ -88,12 +81,9 @@ RedirectToFileDescriptor (int fd, bool transfer_fh_ownership); %feature("docstring", " - //-------------------------------------------------------------------------- - /// If the stream is redirected to a file, forget about the file and if - /// ownership of the file was transferred to this object, close the file. - /// If the stream is backed by a local cache, clear this cache. - //-------------------------------------------------------------------------- - ") Clear; + If the stream is redirected to a file, forget about the file and if + ownership of the file was transferred to this object, close the file. + If the stream is backed by a local cache, clear this cache.") Clear; void Clear (); }; Index: lldb/trunk/scripts/interface/SBStringList.i =================================================================== --- lldb/trunk/scripts/interface/SBStringList.i +++ lldb/trunk/scripts/interface/SBStringList.i @@ -15,7 +15,7 @@ SBStringList (); SBStringList (const lldb::SBStringList &rhs); - + ~SBStringList (); bool Index: lldb/trunk/scripts/interface/SBSymbol.i =================================================================== --- lldb/trunk/scripts/interface/SBSymbol.i +++ lldb/trunk/scripts/interface/SBSymbol.i @@ -35,7 +35,7 @@ const char * GetDisplayName() const; - + const char * GetMangledName () const; @@ -47,10 +47,10 @@ SBAddress GetStartAddress (); - + SBAddress GetEndAddress (); - + uint32_t GetPrologueByteSize (); @@ -68,32 +68,32 @@ bool operator == (const lldb::SBSymbol &rhs) const; - + bool operator != (const lldb::SBSymbol &rhs) const; - + %pythoncode %{ def get_instructions_from_current_target (self): return self.GetInstructions (target) - + __swig_getmethods__["name"] = GetName if _newclass: name = property(GetName, None, doc='''A read only property that returns the name for this symbol as a string.''') - + __swig_getmethods__["mangled"] = GetMangledName if _newclass: mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this symbol as a string.''') - + __swig_getmethods__["type"] = GetType if _newclass: type = property(GetType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSymbolType") that represents the type of this symbol.''') - + __swig_getmethods__["addr"] = GetStartAddress if _newclass: addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this symbol.''') - + __swig_getmethods__["end_addr"] = GetEndAddress if _newclass: end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this symbol.''') - + __swig_getmethods__["prologue_size"] = GetPrologueByteSize if _newclass: prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''') - + __swig_getmethods__["instructions"] = get_instructions_from_current_target if _newclass: instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this symbol.''') @@ -103,7 +103,7 @@ __swig_getmethods__["synthetic"] = IsSynthetic if _newclass: 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.''') - + %} }; Index: lldb/trunk/scripts/interface/SBSymbolContext.i =================================================================== --- lldb/trunk/scripts/interface/SBSymbolContext.i +++ lldb/trunk/scripts/interface/SBSymbolContext.i @@ -72,16 +72,16 @@ void SetBlock (lldb::SBBlock block); void SetLineEntry (lldb::SBLineEntry line_entry); void SetSymbol (lldb::SBSymbol symbol); - + lldb::SBSymbolContext - GetParentOfInlinedScope (const lldb::SBAddress &curr_frame_pc, + GetParentOfInlinedScope (const lldb::SBAddress &curr_frame_pc, lldb::SBAddress &parent_frame_addr) const; - + bool GetDescription (lldb::SBStream &description); - - + + %pythoncode %{ __swig_getmethods__["module"] = GetModule __swig_setmethods__["module"] = SetModule @@ -98,7 +98,7 @@ __swig_getmethods__["block"] = GetBlock __swig_setmethods__["block"] = SetBlock if _newclass: block = property(GetBlock, SetBlock, doc='''A read/write property that allows the getting/setting of the block (lldb.SBBlock) in this symbol context.''') - + __swig_getmethods__["symbol"] = GetSymbol __swig_setmethods__["symbol"] = SetSymbol if _newclass: symbol = property(GetSymbol, SetSymbol, doc='''A read/write property that allows the getting/setting of the symbol (lldb.SBSymbol) in this symbol context.''') Index: lldb/trunk/scripts/interface/SBSymbolContextList.i =================================================================== --- lldb/trunk/scripts/interface/SBSymbolContextList.i +++ lldb/trunk/scripts/interface/SBSymbolContextList.i @@ -27,8 +27,7 @@ for sc in list: self.assertTrue(sc.GetModule().GetFileSpec().GetFilename() == exe_name) - self.assertTrue(sc.GetSymbol().GetName() == 'c') -") SBSymbolContextList; + self.assertTrue(sc.GetSymbol().GetName() == 'c')") SBSymbolContextList; class SBSymbolContextList { public: @@ -51,7 +50,7 @@ void Append (lldb::SBSymbolContext &sc); - + void Append (lldb::SBSymbolContextList &sc_list); @@ -60,7 +59,7 @@ void Clear(); - + %pythoncode %{ def __iter__(self): '''Iterate over all symbol contexts in a lldb.SBSymbolContextList @@ -78,7 +77,7 @@ else: raise IndexError raise TypeError - + def get_module_array(self): a = [] for i in range(len(self)): @@ -86,7 +85,7 @@ if obj: a.append(obj) return a - + def get_compile_unit_array(self): a = [] for i in range(len(self)): @@ -124,19 +123,19 @@ return a __swig_getmethods__["modules"] = get_module_array if _newclass: modules = property(get_module_array, None, doc='''Returns a list() of lldb.SBModule objects, one for each module in each SBSymbolContext object in this list.''') - + __swig_getmethods__["compile_units"] = get_compile_unit_array if _newclass: compile_units = property(get_compile_unit_array, None, doc='''Returns a list() of lldb.SBCompileUnit objects, one for each compile unit in each SBSymbolContext object in this list.''') - + __swig_getmethods__["functions"] = get_function_array if _newclass: functions = property(get_function_array, None, doc='''Returns a list() of lldb.SBFunction objects, one for each function in each SBSymbolContext object in this list.''') - + __swig_getmethods__["blocks"] = get_block_array if _newclass: blocks = property(get_block_array, None, doc='''Returns a list() of lldb.SBBlock objects, one for each block in each SBSymbolContext object in this list.''') - + __swig_getmethods__["line_entries"] = get_line_entry_array if _newclass: 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.''') - + __swig_getmethods__["symbols"] = get_symbol_array if _newclass: 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.''') %} Index: lldb/trunk/scripts/interface/SBTarget.i =================================================================== --- lldb/trunk/scripts/interface/SBTarget.i +++ lldb/trunk/scripts/interface/SBTarget.i @@ -99,94 +99,87 @@ %feature("docstring", " - //------------------------------------------------------------------ - /// Return the platform object associated with the target. - /// - /// After return, the platform object should be checked for - /// validity. - /// - /// @return - /// A platform object. - //------------------------------------------------------------------ - ") GetPlatform; + Return the platform object associated with the target. + + After return, the platform object should be checked for + validity. + + @return + A platform object.") GetPlatform; lldb::SBPlatform GetPlatform (); %feature("docstring", " - //------------------------------------------------------------------ - /// Install any binaries that need to be installed. - /// - /// This function does nothing when debugging on the host system. - /// When connected to remote platforms, the target's main executable - /// and any modules that have their install path set will be - /// installed on the remote platform. If the main executable doesn't - /// have an install location set, it will be installed in the remote - /// platform's working directory. - /// - /// @return - /// An error describing anything that went wrong during - /// installation. - //------------------------------------------------------------------ - ") Install; + Install any binaries that need to be installed. + + This function does nothing when debugging on the host system. + When connected to remote platforms, the target's main executable + and any modules that have their install path set will be + installed on the remote platform. If the main executable doesn't + have an install location set, it will be installed in the remote + platform's working directory. + + @return + An error describing anything that went wrong during + installation.") Install; lldb::SBError Install(); %feature("docstring", " - //------------------------------------------------------------------ - /// Launch a new process. - /// - /// Launch a new process by spawning a new process using the - /// target object's executable module's file as the file to launch. - /// Arguments are given in \a argv, and the environment variables - /// are in \a envp. Standard input and output files can be - /// optionally re-directed to \a stdin_path, \a stdout_path, and - /// \a stderr_path. - /// - /// @param[in] listener - /// An optional listener that will receive all process events. - /// If \a listener is valid then \a listener will listen to all - /// process events. If not valid, then this target's debugger - /// (SBTarget::GetDebugger()) will listen to all process events. - /// - /// @param[in] argv - /// The argument array. - /// - /// @param[in] envp - /// The environment array. - /// - /// @param[in] launch_flags - /// Flags to modify the launch (@see lldb::LaunchFlags) - /// - /// @param[in] stdin_path - /// The path to use when re-directing the STDIN of the new - /// process. If all stdXX_path arguments are NULL, a pseudo - /// terminal will be used. - /// - /// @param[in] stdout_path - /// The path to use when re-directing the STDOUT of the new - /// process. If all stdXX_path arguments are NULL, a pseudo - /// terminal will be used. - /// - /// @param[in] stderr_path - /// The path to use when re-directing the STDERR of the new - /// process. If all stdXX_path arguments are NULL, a pseudo - /// terminal will be used. - /// - /// @param[in] working_directory - /// The working directory to have the child process run in - /// - /// @param[in] launch_flags - /// Some launch options specified by logical OR'ing - /// lldb::LaunchFlags enumeration values together. - /// - /// @param[in] stop_at_entry - /// If false do not stop the inferior at the entry point. - /// - /// @param[out] - /// An error object. Contains the reason if there is some failure. - /// - /// @return - /// A process object for the newly created process. + Launch a new process. + + Launch a new process by spawning a new process using the + target object's executable module's file as the file to launch. + Arguments are given in \a argv, and the environment variables + are in \a envp. Standard input and output files can be + optionally re-directed to \a stdin_path, \a stdout_path, and + \a stderr_path. + + @param[in] listener + An optional listener that will receive all process events. + If \a listener is valid then \a listener will listen to all + process events. If not valid, then this target's debugger + (SBTarget::GetDebugger()) will listen to all process events. + + @param[in] argv + The argument array. + + @param[in] envp + The environment array. + + @param[in] launch_flags + Flags to modify the launch (@see lldb::LaunchFlags) + + @param[in] stdin_path + The path to use when re-directing the STDIN of the new + process. If all stdXX_path arguments are NULL, a pseudo + terminal will be used. + + @param[in] stdout_path + The path to use when re-directing the STDOUT of the new + process. If all stdXX_path arguments are NULL, a pseudo + terminal will be used. + + @param[in] stderr_path + The path to use when re-directing the STDERR of the new + process. If all stdXX_path arguments are NULL, a pseudo + terminal will be used. + + @param[in] working_directory + The working directory to have the child process run in + + @param[in] launch_flags + Some launch options specified by logical OR'ing + lldb::LaunchFlags enumeration values together. + + @param[in] stop_at_entry + If false do not stop the inferior at the entry point. + + @param[out] + An error object. Contains the reason if there is some failure. + + @return + A process object for the newly created process. //------------------------------------------------------------------ For example, @@ -201,8 +194,7 @@ will use its idea of what the current working directory is for the inferior. Also, we ask the debugger not to stop the inferior at the entry point. If no breakpoint is specified for the inferior, it should - run to completion if no user interaction is required. - ") Launch; + run to completion if no user interaction is required.") Launch; lldb::SBProcess Launch (SBListener &listener, char const **argv, @@ -216,31 +208,30 @@ lldb::SBError& error); %feature("docstring", " - //------------------------------------------------------------------ - /// Launch a new process with sensible defaults. - /// - /// @param[in] argv - /// The argument array. - /// - /// @param[in] envp - /// The environment array. - /// - /// @param[in] working_directory - /// The working directory to have the child process run in - /// - /// Default: listener - /// Set to the target's debugger (SBTarget::GetDebugger()) - /// - /// Default: launch_flags - /// Empty launch flags - /// - /// Default: stdin_path - /// Default: stdout_path - /// Default: stderr_path - /// A pseudo terminal will be used. - /// - /// @return - /// A process object for the newly created process. + Launch a new process with sensible defaults. + + @param[in] argv + The argument array. + + @param[in] envp + The environment array. + + @param[in] working_directory + The working directory to have the child process run in + + Default: listener + Set to the target's debugger (SBTarget::GetDebugger()) + + Default: launch_flags + Empty launch flags + + Default: stdin_path + Default: stdout_path + Default: stderr_path + A pseudo terminal will be used. + + @return + A process object for the newly created process. //------------------------------------------------------------------ For example, @@ -248,8 +239,7 @@ process = target.LaunchSimple(['X', 'Y', 'Z'], None, os.getcwd()) launches a new process by passing 'X', 'Y', 'Z' as the args to the - executable. - ") LaunchSimple; + executable.") LaunchSimple; lldb::SBProcess LaunchSimple (const char **argv, const char **envp, @@ -259,26 +249,24 @@ Launch (lldb::SBLaunchInfo &launch_info, lldb::SBError& error); %feature("docstring", " - //------------------------------------------------------------------ - /// Load a core file - /// - /// @param[in] core_file - /// File path of the core dump. - /// - /// @param[out] error - /// An error explaining what went wrong if the operation fails. - /// (Optional) - /// - /// @return - /// A process object for the newly created core file. + Load a core file + + @param[in] core_file + File path of the core dump. + + @param[out] error + An error explaining what went wrong if the operation fails. + (Optional) + + @return + A process object for the newly created core file. //------------------------------------------------------------------ For example, process = target.LoadCore('./a.out.core') - loads a new core file and returns the process object. - ") LoadCore; + loads a new core file and returns the process object.") LoadCore; lldb::SBProcess LoadCore(const char *core_file); @@ -289,53 +277,47 @@ Attach(lldb::SBAttachInfo &attach_info, lldb::SBError& error); %feature("docstring", " - //------------------------------------------------------------------ - /// Attach to process with pid. - /// - /// @param[in] listener - /// An optional listener that will receive all process events. - /// If \a listener is valid then \a listener will listen to all - /// process events. If not valid, then this target's debugger - /// (SBTarget::GetDebugger()) will listen to all process events. - /// - /// @param[in] pid - /// The process ID to attach to. - /// - /// @param[out] - /// An error explaining what went wrong if attach fails. - /// - /// @return - /// A process object for the attached process. - //------------------------------------------------------------------ - ") AttachToProcessWithID; + Attach to process with pid. + + @param[in] listener + An optional listener that will receive all process events. + If \a listener is valid then \a listener will listen to all + process events. If not valid, then this target's debugger + (SBTarget::GetDebugger()) will listen to all process events. + + @param[in] pid + The process ID to attach to. + + @param[out] + An error explaining what went wrong if attach fails. + + @return + A process object for the attached process.") AttachToProcessWithID; lldb::SBProcess AttachToProcessWithID (SBListener &listener, lldb::pid_t pid, lldb::SBError& error); %feature("docstring", " - //------------------------------------------------------------------ - /// Attach to process with name. - /// - /// @param[in] listener - /// An optional listener that will receive all process events. - /// If \a listener is valid then \a listener will listen to all - /// process events. If not valid, then this target's debugger - /// (SBTarget::GetDebugger()) will listen to all process events. - /// - /// @param[in] name - /// Basename of process to attach to. - /// - /// @param[in] wait_for - /// If true wait for a new instance of 'name' to be launched. - /// - /// @param[out] - /// An error explaining what went wrong if attach fails. - /// - /// @return - /// A process object for the attached process. - //------------------------------------------------------------------ - ") AttachToProcessWithName; + Attach to process with name. + + @param[in] listener + An optional listener that will receive all process events. + If \a listener is valid then \a listener will listen to all + process events. If not valid, then this target's debugger + (SBTarget::GetDebugger()) will listen to all process events. + + @param[in] name + Basename of process to attach to. + + @param[in] wait_for + If true wait for a new instance of 'name' to be launched. + + @param[out] + An error explaining what went wrong if attach fails. + + @return + A process object for the attached process.") AttachToProcessWithName; lldb::SBProcess AttachToProcessWithName (SBListener &listener, const char *name, @@ -343,28 +325,25 @@ lldb::SBError& error); %feature("docstring", " - //------------------------------------------------------------------ - /// Connect to a remote debug server with url. - /// - /// @param[in] listener - /// An optional listener that will receive all process events. - /// If \a listener is valid then \a listener will listen to all - /// process events. If not valid, then this target's debugger - /// (SBTarget::GetDebugger()) will listen to all process events. - /// - /// @param[in] url - /// The url to connect to, e.g., 'connect://localhost:12345'. - /// - /// @param[in] plugin_name - /// The plugin name to be used; can be NULL. - /// - /// @param[out] - /// An error explaining what went wrong if the connect fails. - /// - /// @return - /// A process object for the connected process. - //------------------------------------------------------------------ - ") ConnectRemote; + Connect to a remote debug server with url. + + @param[in] listener + An optional listener that will receive all process events. + If \a listener is valid then \a listener will listen to all + process events. If not valid, then this target's debugger + (SBTarget::GetDebugger()) will listen to all process events. + + @param[in] url + The url to connect to, e.g., 'connect://localhost:12345'. + + @param[in] plugin_name + The plugin name to be used; can be NULL. + + @param[out] + An error explaining what went wrong if the connect fails. + + @return + A process object for the connected process.") ConnectRemote; lldb::SBProcess ConnectRemote (SBListener &listener, const char *url, @@ -375,8 +354,7 @@ GetExecutable (); %feature("docstring", " - /// Append the path mapping (from -> to) to the target's paths mapping list. - ") AppendImageSearchPath; + Append the path mapping (from -> to) to the target's paths mapping list.") AppendImageSearchPath; void AppendImageSearchPath (const char *from, const char *to, @@ -415,19 +393,16 @@ FindModule (const lldb::SBFileSpec &file_spec); %feature("docstring", " - //------------------------------------------------------------------ - /// Find compile units related to *this target and passed source - /// file. - /// - /// @param[in] sb_file_spec - /// A lldb::SBFileSpec object that contains source file - /// specification. - /// - /// @return - /// A lldb::SBSymbolContextList that gets filled in with all of - /// the symbol contexts for all the matches. - //------------------------------------------------------------------ - ") FindCompileUnits; + Find compile units related to *this target and passed source + file. + + @param[in] sb_file_spec + A lldb::SBFileSpec object that contains source file + specification. + + @return + A lldb::SBSymbolContextList that gets filled in with all of + the symbol contexts for all the matches.") FindCompileUnits; lldb::SBSymbolContextList FindCompileUnits (const lldb::SBFileSpec &sb_file_spec); @@ -441,26 +416,20 @@ GetTriple (); %feature("docstring", " - //------------------------------------------------------------------ - /// Architecture data byte width accessor - /// - /// @return - /// The size in 8-bit (host) bytes of a minimum addressable - /// unit from the Architecture's data bus - //------------------------------------------------------------------ - ") GetDataByteSize; + Architecture data byte width accessor + + @return + The size in 8-bit (host) bytes of a minimum addressable + unit from the Architecture's data bus") GetDataByteSize; uint32_t GetDataByteSize (); %feature("docstring", " - //------------------------------------------------------------------ - /// Architecture code byte width accessor - /// - /// @return - /// The size in 8-bit (host) bytes of a minimum addressable - /// unit from the Architecture's code bus - //------------------------------------------------------------------ - ") GetCodeByteSize; + Architecture code byte width accessor + + @return + The size in 8-bit (host) bytes of a minimum addressable + unit from the Architecture's code bus") GetCodeByteSize; uint32_t GetCodeByteSize (); @@ -479,24 +448,21 @@ ClearModuleLoadAddress (lldb::SBModule module); %feature("docstring", " - //------------------------------------------------------------------ - /// Find functions by name. - /// - /// @param[in] name - /// The name of the function we are looking for. - /// - /// @param[in] name_type_mask - /// A logical OR of one or more FunctionNameType enum bits that - /// indicate what kind of names should be used when doing the - /// lookup. Bits include fully qualified names, base names, - /// C++ methods, or ObjC selectors. - /// See FunctionNameType for more details. - /// - /// @return - /// A lldb::SBSymbolContextList that gets filled in with all of - /// the symbol contexts for all the matches. - //------------------------------------------------------------------ - ") FindFunctions; + Find functions by name. + + @param[in] name + The name of the function we are looking for. + + @param[in] name_type_mask + A logical OR of one or more FunctionNameType enum bits that + indicate what kind of names should be used when doing the + lookup. Bits include fully qualified names, base names, + C++ methods, or ObjC selectors. + See FunctionNameType for more details. + + @return + A lldb::SBSymbolContextList that gets filled in with all of + the symbol contexts for all the matches.") FindFunctions; lldb::SBSymbolContextList FindFunctions (const char *name, uint32_t name_type_mask = lldb::eFunctionNameTypeAny); @@ -514,36 +480,30 @@ GetSourceManager (); %feature("docstring", " - //------------------------------------------------------------------ - /// Find global and static variables by name. - /// - /// @param[in] name - /// The name of the global or static variable we are looking - /// for. - /// - /// @param[in] max_matches - /// Allow the number of matches to be limited to \a max_matches. - /// - /// @return - /// A list of matched variables in an SBValueList. - //------------------------------------------------------------------ - ") FindGlobalVariables; + Find global and static variables by name. + + @param[in] name + The name of the global or static variable we are looking + for. + + @param[in] max_matches + Allow the number of matches to be limited to \a max_matches. + + @return + A list of matched variables in an SBValueList.") FindGlobalVariables; lldb::SBValueList FindGlobalVariables (const char *name, uint32_t max_matches); %feature("docstring", " - //------------------------------------------------------------------ - /// Find the first global (or static) variable by name. - /// - /// @param[in] name - /// The name of the global or static variable we are looking - /// for. - /// - /// @return - /// An SBValue that gets filled in with the found variable (if any). - //------------------------------------------------------------------ - ") FindFirstGlobalVariable; + Find the first global (or static) variable by name. + + @param[in] name + The name of the global or static variable we are looking + for. + + @return + An SBValue that gets filled in with the found variable (if any).") FindFirstGlobalVariable; lldb::SBValue FindFirstGlobalVariable (const char* name); @@ -562,15 +522,12 @@ Clear (); %feature("docstring", " - //------------------------------------------------------------------ - /// Resolve a current file address into a section offset address. - /// - /// @param[in] file_addr - /// - /// @return - /// An SBAddress which will be valid if... - //------------------------------------------------------------------ - ") ResolveFileAddress; + Resolve a current file address into a section offset address. + + @param[in] file_addr + + @return + An SBAddress which will be valid if...") ResolveFileAddress; lldb::SBAddress ResolveFileAddress (lldb::addr_t file_addr); @@ -585,29 +542,26 @@ uint32_t resolve_scope); %feature("docstring", " - //------------------------------------------------------------------ - /// Read target memory. If a target process is running then memory - /// is read from here. Otherwise the memory is read from the object - /// files. For a target whose bytes are sized as a multiple of host - /// bytes, the data read back will preserve the target's byte order. - /// - /// @param[in] addr - /// A target address to read from. - /// - /// @param[out] buf - /// The buffer to read memory into. - /// - /// @param[in] size - /// The maximum number of host bytes to read in the buffer passed - /// into this call - /// - /// @param[out] error - /// Error information is written here if the memory read fails. - /// - /// @return - /// The amount of data read in host bytes. - //------------------------------------------------------------------ - ") ReadMemory; + Read target memory. If a target process is running then memory + is read from here. Otherwise the memory is read from the object + files. For a target whose bytes are sized as a multiple of host + bytes, the data read back will preserve the target's byte order. + + @param[in] addr + A target address to read from. + + @param[out] buf + The buffer to read memory into. + + @param[in] size + The maximum number of host bytes to read in the buffer passed + into this call + + @param[out] error + Error information is written here if the memory read fails. + + @return + The amount of data read in host bytes.") ReadMemory; size_t ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error); @@ -732,9 +686,8 @@ lldb::SBBreakpoint BreakpointCreateBySBAddress (SBAddress &sb_address); - + %feature("docstring", " - //------------------------------------------------------------------ /// Create a breakpoint using a scripted resolver. /// /// @param[in] class_name @@ -746,7 +699,7 @@ /// # the resolver finds an interesting address, call AddLocation /// # on this breakpoint to add it. /// # - /// # extra_args - an SBStructuredData that can be used to + /// # extra_args - an SBStructuredData that can be used to /// # parametrize this instance. Same as the extra_args passed /// # to BreakpointCreateFromScript. /// @@ -758,10 +711,10 @@ /// # lldb.eSearchDepthCompUnit /// # The default if you don't implement this method is /// # eSearchDepthModule. - /// + /// /// def __callback__(self, sym_ctx): - /// # sym_ctx - an SBSymbolContext that is the cursor in the - /// # search through the program to resolve breakpoints. + /// # sym_ctx - an SBSymbolContext that is the cursor in the + /// # search through the program to resolve breakpoints. /// # The sym_ctx will be filled out to the depth requested in /// # __get_depth__. /// # Look in this sym_ctx for new breakpoint locations, @@ -777,23 +730,21 @@ /// /// @param[in] extra_args /// This is an SBStructuredData object that will get passed to the - /// constructor of the class in class_name. You can use this to - /// reuse the same class, parametrizing it with entries from this + /// constructor of the class in class_name. You can use this to + /// reuse the same class, parametrizing it with entries from this /// dictionary. /// /// @param module_list - /// If this is non-empty, this will be used as the module filter in the + /// If this is non-empty, this will be used as the module filter in the /// SearchFilter created for this breakpoint. /// /// @param file_list - /// If this is non-empty, this will be used as the comp unit filter in the + /// If this is non-empty, this will be used as the comp unit filter in the /// SearchFilter created for this breakpoint. /// /// @return /// An SBBreakpoint that will set locations based on the logic in the - /// resolver's search callback. - //------------------------------------------------------------------ - ") BreakpointCreateFromScript; + /// resolver's search callback.") BreakpointCreateFromScript; lldb::SBBreakpoint BreakpointCreateFromScript( const char *class_name, SBStructuredData &extra_args, @@ -830,80 +781,68 @@ DeleteAllBreakpoints (); %feature("docstring", " - //------------------------------------------------------------------ - /// Read breakpoints from source_file and return the newly created - /// breakpoints in bkpt_list. - /// - /// @param[in] source_file - /// The file from which to read the breakpoints - /// - /// @param[out] bkpt_list - /// A list of the newly created breakpoints. - /// - /// @return - /// An SBError detailing any errors in reading in the breakpoints. - //------------------------------------------------------------------ - ") BreakpointsCreateFromFile; + Read breakpoints from source_file and return the newly created + breakpoints in bkpt_list. + + @param[in] source_file + The file from which to read the breakpoints + + @param[out] bkpt_list + A list of the newly created breakpoints. + + @return + An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile; lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file, SBBreakpointList &bkpt_list); %feature("docstring", " - //------------------------------------------------------------------ - /// Read breakpoints from source_file and return the newly created - /// breakpoints in bkpt_list. - /// - /// @param[in] source_file - /// The file from which to read the breakpoints - /// - /// @param[in] matching_names - /// Only read in breakpoints whose names match one of the names in this - /// list. - /// - /// @param[out] bkpt_list - /// A list of the newly created breakpoints. - /// - /// @return - /// An SBError detailing any errors in reading in the breakpoints. - //------------------------------------------------------------------ - ") BreakpointsCreateFromFile; + Read breakpoints from source_file and return the newly created + breakpoints in bkpt_list. + + @param[in] source_file + The file from which to read the breakpoints + + @param[in] matching_names + Only read in breakpoints whose names match one of the names in this + list. + + @param[out] bkpt_list + A list of the newly created breakpoints. + + @return + An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile; lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file, SBStringList &matching_names, SBBreakpointList &new_bps); %feature("docstring", " - //------------------------------------------------------------------ - /// Write breakpoints to dest_file. - /// - /// @param[in] dest_file - /// The file to which to write the breakpoints. - /// - /// @return - /// An SBError detailing any errors in writing in the breakpoints. - //------------------------------------------------------------------ - ") BreakpointsCreateFromFile; + Write breakpoints to dest_file. + + @param[in] dest_file + The file to which to write the breakpoints. + + @return + An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile; lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file); %feature("docstring", " - //------------------------------------------------------------------ - /// Write breakpoints listed in bkpt_list to dest_file. - /// - /// @param[in] dest_file - /// The file to which to write the breakpoints. - /// - /// @param[in] bkpt_list - /// Only write breakpoints from this list. - /// - /// @param[in] append - /// If \btrue, append the breakpoints in bkpt_list to the others - /// serialized in dest_file. If dest_file doesn't exist, then a new - /// file will be created and the breakpoints in bkpt_list written to it. - /// - /// @return - /// An SBError detailing any errors in writing in the breakpoints. - //------------------------------------------------------------------ - ") BreakpointsCreateFromFile; + Write breakpoints listed in bkpt_list to dest_file. + + @param[in] dest_file + The file to which to write the breakpoints. + + @param[in] bkpt_list + Only write breakpoints from this list. + + @param[in] append + If \btrue, append the breakpoints in bkpt_list to the others + serialized in dest_file. If dest_file doesn't exist, then a new + file will be created and the breakpoints in bkpt_list written to it. + + @return + An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile; lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file, SBBreakpointList &bkpt_list, @@ -942,23 +881,20 @@ GetBroadcaster () const; %feature("docstring", " - //------------------------------------------------------------------ - /// Create an SBValue with the given name by treating the memory starting at addr as an entity of type. - /// - /// @param[in] name - /// The name of the resultant SBValue - /// - /// @param[in] addr - /// The address of the start of the memory region to be used. - /// - /// @param[in] type - /// The type to use to interpret the memory starting at addr. - /// - /// @return - /// An SBValue of the given type, may be invalid if there was an error reading - /// the underlying memory. - //------------------------------------------------------------------ - ") CreateValueFromAddress; + Create an SBValue with the given name by treating the memory starting at addr as an entity of type. + + @param[in] name + The name of the resultant SBValue + + @param[in] addr + The address of the start of the memory region to be used. + + @param[in] type + The type to use to interpret the memory starting at addr. + + @return + An SBValue of the given type, may be invalid if there was an error reading + the underlying memory.") CreateValueFromAddress; lldb::SBValue CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type); Index: lldb/trunk/scripts/interface/SBThread.i =================================================================== --- lldb/trunk/scripts/interface/SBThread.i +++ lldb/trunk/scripts/interface/SBThread.i @@ -61,13 +61,13 @@ static const char * GetBroadcasterClassName (); - + static bool EventIsThreadEvent (const SBEvent &event); - + static SBFrame GetStackFrameFromEvent (const SBEvent &event); - + static SBThread GetThreadFromEvent (const SBEvent &event); @@ -83,56 +83,49 @@ GetStopReason(); %feature("docstring", " - /// Get the number of words associated with the stop reason. - /// See also GetStopReasonDataAtIndex(). - ") GetStopReasonDataCount; + Get the number of words associated with the stop reason. + See also GetStopReasonDataAtIndex().") GetStopReasonDataCount; size_t GetStopReasonDataCount(); %feature("docstring", " - //-------------------------------------------------------------------------- - /// Get information associated with a stop reason. - /// - /// Breakpoint stop reasons will have data that consists of pairs of - /// breakpoint IDs followed by the breakpoint location IDs (they always come - /// in pairs). - /// - /// Stop Reason Count Data Type - /// ======================== ===== ========================================= - /// eStopReasonNone 0 - /// eStopReasonTrace 0 - /// eStopReasonBreakpoint N duple: {breakpoint id, location id} - /// eStopReasonWatchpoint 1 watchpoint id - /// eStopReasonSignal 1 unix signal number - /// eStopReasonException N exception data - /// eStopReasonExec 0 - /// eStopReasonPlanComplete 0 - //-------------------------------------------------------------------------- - ") GetStopReasonDataAtIndex; + Get information associated with a stop reason. + + Breakpoint stop reasons will have data that consists of pairs of + breakpoint IDs followed by the breakpoint location IDs (they always come + in pairs). + + Stop Reason Count Data Type + ======================== ===== ========================================= + eStopReasonNone 0 + eStopReasonTrace 0 + eStopReasonBreakpoint N duple: {breakpoint id, location id} + eStopReasonWatchpoint 1 watchpoint id + eStopReasonSignal 1 unix signal number + eStopReasonException N exception data + eStopReasonExec 0 + eStopReasonPlanComplete 0") GetStopReasonDataAtIndex; uint64_t GetStopReasonDataAtIndex(uint32_t idx); - + %feature("autodoc", " Collects a thread's stop reason extended information dictionary and prints it into the SBStream in a JSON format. The format of this JSON dictionary depends - on the stop reason and is currently used only for instrumentation plugins. - ") GetStopReasonExtendedInfoAsJSON; + on the stop reason and is currently used only for instrumentation plugins.") GetStopReasonExtendedInfoAsJSON; bool GetStopReasonExtendedInfoAsJSON (lldb::SBStream &stream); - + %feature("autodoc", " Returns a collection of historical stack traces that are significant to the current stop reason. Used by ThreadSanitizer, where we provide various stack - traces that were involved in a data race or other type of detected issue. - ") GetStopReasonExtendedBacktraces; + traces that were involved in a data race or other type of detected issue.") GetStopReasonExtendedBacktraces; SBThreadCollection GetStopReasonExtendedBacktraces (InstrumentationRuntimeType type); %feature("autodoc", " Pass only an (int)length and expect to get a Python string describing the - stop reason. - ") GetStopDescription; + stop reason.") GetStopDescription; size_t GetStopDescription (char *dst, size_t dst_len); @@ -145,8 +138,7 @@ lifetime in this process and will not be reused by another thread during this process lifetime. On Mac OS X systems, this is a system-wide unique thread identifier; this identifier is also used by other tools like sample which helps - to associate data from those tools with lldb. See related GetIndexID. - ") + to associate data from those tools with lldb. See related GetIndexID.") GetThreadID; lldb::tid_t GetThreadID () const; @@ -158,8 +150,7 @@ and increments up throughout the process lifetime. An index number will not be reused for a different thread later in a process - thread 1 will always be associated with the same thread. See related GetThreadID. - This method returns a uint32_t index number, takes no arguments. - ") + This method returns a uint32_t index number, takes no arguments.") GetIndexID; uint32_t GetIndexID () const; @@ -169,29 +160,24 @@ %feature("autodoc", " Return the queue name associated with this thread, if any, as a str. - For example, with a libdispatch (aka Grand Central Dispatch) queue. - ") GetQueueName; + For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueName; const char * GetQueueName() const; %feature("autodoc", " Return the dispatch_queue_id for this thread, if any, as a lldb::queue_id_t. - For example, with a libdispatch (aka Grand Central Dispatch) queue. - ") GetQueueID; + For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueID; lldb::queue_id_t GetQueueID() const; %feature("docstring", " - //-------------------------------------------------------------------------- - /// Takes a path string and a SBStream reference as parameters, returns a bool. - /// Collects the thread's 'info' dictionary from the remote system, uses the path - /// argument to descend into the dictionary to an item of interest, and prints - /// it into the SBStream in a natural format. Return bool is to indicate if - /// anything was printed into the stream (true) or not (false). - //-------------------------------------------------------------------------- - ") GetInfoItemByPathAsString; + Takes a path string and a SBStream reference as parameters, returns a bool. + Collects the thread's 'info' dictionary from the remote system, uses the path + argument to descend into the dictionary to an item of interest, and prints + it into the SBStream in a natural format. Return bool is to indicate if + anything was printed into the stream (true) or not (false).") GetInfoItemByPathAsString; bool GetInfoItemByPathAsString (const char *path, lldb::SBStream &strm); @@ -203,8 +189,7 @@ and QueueName, but not provide an SBQueue. Those individual attributes may have been saved for the HistoryThread without enough information to reconstitute the entire SBQueue at that time. - This method takes no arguments, returns an SBQueue. - ") GetQueue; + This method takes no arguments, returns an SBQueue.") GetQueue; lldb::SBQueue GetQueue () const; @@ -226,8 +211,7 @@ %feature("autodoc", " Step the current thread from the current source line to the line given by end_line, stopping if the thread steps into the function given by target_name. If target_name is None, then stepping will stop - in any of the places we would normally stop. - ") StepInto; + in any of the places we would normally stop.") StepInto; void StepInto (const char *target_name, uint32_t end_line, @@ -254,8 +238,7 @@ StepInstruction(bool step_over); %feature("autodoc", - "Do an instruction level single step in the currently selected thread. - ") StepInstruction; + "Do an instruction level single step in the currently selected thread.") StepInstruction; void StepInstruction(bool step_over, SBError &error); @@ -283,55 +266,50 @@ Force a return from the frame passed in (and any frames younger than it) without executing any more code in those frames. If return_value contains a valid SBValue, that will be set as the return value from frame. Note, at - present only scalar return values are supported. - ") ReturnFromFrame; - + present only scalar return values are supported.") ReturnFromFrame; + SBError ReturnFromFrame (SBFrame &frame, SBValue &return_value); %feature("autodoc", " Unwind the stack frames from the innermost expression evaluation. - This API is equivalent to 'thread return -x'. - ") UnwindInnermostExpression; - + This API is equivalent to 'thread return -x'.") UnwindInnermostExpression; + SBError UnwindInnermostExpression(); %feature("docstring", " - //-------------------------------------------------------------------------- - /// LLDB currently supports process centric debugging which means when any - /// thread in a process stops, all other threads are stopped. The Suspend() - /// call here tells our process to suspend a thread and not let it run when - /// the other threads in a process are allowed to run. So when - /// SBProcess::Continue() is called, any threads that aren't suspended will - /// be allowed to run. If any of the SBThread functions for stepping are - /// called (StepOver, StepInto, StepOut, StepInstruction, RunToAddres), the - /// thread will now be allowed to run and these functions will simply return. - /// - /// Eventually we plan to add support for thread centric debugging where - /// each thread is controlled individually and each thread would broadcast - /// its state, but we haven't implemented this yet. - /// - /// Likewise the SBThread::Resume() call will again allow the thread to run - /// when the process is continued. - /// - /// Suspend() and Resume() functions are not currently reference counted, if - /// anyone has the need for them to be reference counted, please let us - /// know. - //-------------------------------------------------------------------------- - ") Suspend; + LLDB currently supports process centric debugging which means when any + thread in a process stops, all other threads are stopped. The Suspend() + call here tells our process to suspend a thread and not let it run when + the other threads in a process are allowed to run. So when + SBProcess::Continue() is called, any threads that aren't suspended will + be allowed to run. If any of the SBThread functions for stepping are + called (StepOver, StepInto, StepOut, StepInstruction, RunToAddres), the + thread will now be allowed to run and these functions will simply return. + + Eventually we plan to add support for thread centric debugging where + each thread is controlled individually and each thread would broadcast + its state, but we haven't implemented this yet. + + Likewise the SBThread::Resume() call will again allow the thread to run + when the process is continued. + + Suspend() and Resume() functions are not currently reference counted, if + anyone has the need for them to be reference counted, please let us + know.") Suspend; bool Suspend(); bool Suspend(SBError &error); - + bool Resume (); bool Resume (SBError &error); - + bool IsSuspended(); @@ -355,19 +333,16 @@ bool GetDescription (lldb::SBStream &description) const; - + %feature("docstring", " - //-------------------------------------------------------------------------- - /// Get the description strings for this thread that match what the - /// lldb driver will present, using the thread-format (stop_format==false) - /// or thread-stop-format (stop_format = true). - //-------------------------------------------------------------------------- - ") GetDescription; + Get the description strings for this thread that match what the + lldb driver will present, using the thread-format (stop_format==false) + or thread-stop-format (stop_format = true).") GetDescription; bool GetDescription(lldb::SBStream &description, bool stop_format) const; bool GetStatus (lldb::SBStream &status) const; - + bool operator == (const lldb::SBThread &rhs) const; @@ -376,35 +351,32 @@ %feature("autodoc"," Given an argument of str to specify the type of thread-origin extended - backtrace to retrieve, query whether the origin of this thread is + backtrace to retrieve, query whether the origin of this thread is available. An SBThread is retured; SBThread.IsValid will return true if an extended backtrace was available. The returned SBThread is not a part of the SBProcess' thread list and it cannot be manipulated like normal threads -- you cannot step or resume it, for instance -- it is intended to used primarily for generating a backtrace. You may request - the returned thread's own thread origin in turn. - ") GetExtendedBacktraceThread; + the returned thread's own thread origin in turn.") GetExtendedBacktraceThread; lldb::SBThread GetExtendedBacktraceThread (const char *type); %feature("autodoc"," Takes no arguments, returns a uint32_t. If this SBThread is an ExtendedBacktrace thread, get the IndexID of the - original thread that this ExtendedBacktrace thread represents, if + original thread that this ExtendedBacktrace thread represents, if available. The thread that was running this backtrace in the past may not have been registered with lldb's thread index (if it was created, did its work, and was destroyed without lldb ever stopping execution). - In that case, this ExtendedBacktrace thread's IndexID will be returned. - ") GetExtendedBacktraceOriginatingIndexID; + In that case, this ExtendedBacktrace thread's IndexID will be returned.") GetExtendedBacktraceOriginatingIndexID; uint32_t GetExtendedBacktraceOriginatingIndexID(); - + %feature("autodoc"," Returns an SBValue object represeting the current exception for the thread, if there is any. Currently, this works for Obj-C code and returns an SBValue representing the NSException object at the throw site or that's currently - being processes. - ") GetCurrentException; + being processes.") GetCurrentException; lldb::SBValue GetCurrentException(); @@ -412,8 +384,7 @@ Returns a historical (fake) SBThread representing the stack trace of an exception, if there is one for the thread. Currently, this works for Obj-C code, and can retrieve the throw-site backtrace of an NSException object - even when the program is no longer at the throw site. - ") GetCurrentExceptionBacktrace; + even when the program is no longer at the throw site.") GetCurrentExceptionBacktrace; lldb::SBThread GetCurrentExceptionBacktrace(); @@ -422,8 +393,7 @@ lldb may be able to detect that function calls should not be executed on a given thread at a particular point in time. It is recommended that this is checked before performing an inferior function call on a given - thread. - ") SafeToCallFunctions; + thread.") SafeToCallFunctions; bool SafeToCallFunctions (); @@ -445,12 +415,12 @@ if self.sbthread: return int(self.sbthread.GetNumFrames()) return 0 - + def __getitem__(self, key): if type(key) is int and key < self.sbthread.GetNumFrames(): return self.sbthread.GetFrameAtIndex(key) return None - + def get_frames_access_object(self): '''An accessor function that returns a frames_access() object which allows lazy frame access from a lldb.SBThread object.''' return self.frames_access (self) @@ -461,7 +431,7 @@ for frame in self: frames.append(frame) return frames - + __swig_getmethods__["id"] = GetThreadID if _newclass: id = property(GetThreadID, None, doc='''A read only property that returns the thread ID as an integer.''') Index: lldb/trunk/scripts/interface/SBThreadCollection.i =================================================================== --- lldb/trunk/scripts/interface/SBThreadCollection.i +++ lldb/trunk/scripts/interface/SBThreadCollection.i @@ -16,24 +16,24 @@ class SBThreadCollection { public: - + SBThreadCollection (); - + SBThreadCollection (const SBThreadCollection &rhs); - + ~SBThreadCollection (); - + bool IsValid () const; explicit operator bool() const; - + size_t GetSize (); - + lldb::SBThread GetThreadAtIndex (size_t idx); - + }; - + } // namespace lldb Index: lldb/trunk/scripts/interface/SBThreadPlan.i =================================================================== --- lldb/trunk/scripts/interface/SBThreadPlan.i +++ lldb/trunk/scripts/interface/SBThreadPlan.i @@ -30,7 +30,7 @@ SBThreadPlan (); SBThreadPlan (const lldb::SBThreadPlan &threadPlan); - + SBThreadPlan (const lldb::ThreadPlanSP& lldb_object_sp); SBThreadPlan (lldb::SBThread &thread, const char *class_name); @@ -49,32 +49,28 @@ GetStopReason(); %feature("docstring", " - /// Get the number of words associated with the stop reason. - /// See also GetStopReasonDataAtIndex(). - ") GetStopReasonDataCount; + Get the number of words associated with the stop reason. + See also GetStopReasonDataAtIndex().") GetStopReasonDataCount; size_t GetStopReasonDataCount(); %feature("docstring", " - //-------------------------------------------------------------------------- - /// Get information associated with a stop reason. - /// - /// Breakpoint stop reasons will have data that consists of pairs of - /// breakpoint IDs followed by the breakpoint location IDs (they always come - /// in pairs). - /// - /// Stop Reason Count Data Type - /// ======================== ===== ========================================= - /// eStopReasonNone 0 - /// eStopReasonTrace 0 - /// eStopReasonBreakpoint N duple: {breakpoint id, location id} - /// eStopReasonWatchpoint 1 watchpoint id - /// eStopReasonSignal 1 unix signal number - /// eStopReasonException N exception data - /// eStopReasonExec 0 - /// eStopReasonPlanComplete 0 - //-------------------------------------------------------------------------- - ") GetStopReasonDataAtIndex; + Get information associated with a stop reason. + + Breakpoint stop reasons will have data that consists of pairs of + breakpoint IDs followed by the breakpoint location IDs (they always come + in pairs). + + Stop Reason Count Data Type + ======================== ===== ========================================= + eStopReasonNone 0 + eStopReasonTrace 0 + eStopReasonBreakpoint N duple: {breakpoint id, location id} + eStopReasonWatchpoint 1 watchpoint id + eStopReasonSignal 1 unix signal number + eStopReasonException N exception data + eStopReasonExec 0 + eStopReasonPlanComplete 0") GetStopReasonDataAtIndex; uint64_t GetStopReasonDataAtIndex(uint32_t idx); @@ -108,7 +104,7 @@ SBThreadPlan QueueThreadPlanForStepOut (uint32_t frame_idx_to_step_to, bool first_insn = false); - + SBThreadPlan QueueThreadPlanForRunToAddress (SBAddress address); Index: lldb/trunk/scripts/interface/SBType.i =================================================================== --- lldb/trunk/scripts/interface/SBType.i +++ lldb/trunk/scripts/interface/SBType.i @@ -9,8 +9,7 @@ namespace lldb { %feature("docstring", -"Represents a member of a type in lldb. -") SBTypeMember; +"Represents a member of a type in lldb.") SBTypeMember; class SBTypeMember { @@ -28,32 +27,32 @@ const char * GetName (); - + lldb::SBType GetType (); uint64_t GetOffsetInBytes(); - + uint64_t GetOffsetInBits(); - + bool IsBitfield(); - + uint32_t GetBitfieldSizeInBits(); %pythoncode %{ __swig_getmethods__["name"] = GetName if _newclass: name = property(GetName, None, doc='''A read only property that returns the name for this member as a string.''') - + __swig_getmethods__["type"] = GetType if _newclass: type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this member.''') - + __swig_getmethods__["byte_offset"] = GetOffsetInBytes if _newclass: byte_offset = property(GetOffsetInBytes, None, doc='''A read only property that returns offset in bytes for this member as an integer.''') - + __swig_getmethods__["bit_offset"] = GetOffsetInBits if _newclass: bit_offset = property(GetOffsetInBits, None, doc='''A read only property that returns offset in bits for this member as an integer.''') @@ -68,24 +67,24 @@ protected: std::unique_ptr m_opaque_ap; }; - + class SBTypeMemberFunction { public: SBTypeMemberFunction (); - + SBTypeMemberFunction (const lldb::SBTypeMemberFunction& rhs); - + ~SBTypeMemberFunction(); - + bool IsValid() const; explicit operator bool() const; - + const char * GetName (); - + const char * GetDemangledName (); @@ -94,23 +93,23 @@ lldb::SBType GetType (); - + lldb::SBType GetReturnType (); - + uint32_t GetNumberOfArguments (); - + lldb::SBType GetArgumentTypeAtIndex (uint32_t); - + lldb::MemberFunctionKind GetKind(); - + bool GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); - + protected: lldb::TypeMemberFunctionImplSP m_opaque_sp; }; @@ -186,8 +185,7 @@ # id_type and int_type should be the same type! self.assertTrue(id_type == int_type) -... -") SBType; +...") SBType; class SBType { public: @@ -210,25 +208,25 @@ bool IsReferenceType(); - + bool IsFunctionType (); bool IsPolymorphicClass (); - + bool IsArrayType (); - + bool IsVectorType (); - + bool IsTypedefType (); - + bool IsAnonymousType (); - + lldb::SBType GetPointerType(); @@ -240,22 +238,22 @@ lldb::SBType SBType::GetTypedefedType(); - + lldb::SBType GetDereferencedType(); lldb::SBType GetUnqualifiedType(); - + lldb::SBType GetCanonicalType(); - + lldb::SBType GetArrayElementType (); lldb::SBType GetArrayType (uint64_t size); - + lldb::SBType GetVectorElementType (); @@ -267,19 +265,19 @@ uint32_t GetNumberOfFields (); - + uint32_t GetNumberOfDirectBaseClasses (); - + uint32_t GetNumberOfVirtualBaseClasses (); - + lldb::SBTypeMember GetFieldAtIndex (uint32_t idx); - + lldb::SBTypeMember GetDirectBaseClassAtIndex (uint32_t idx); - + lldb::SBTypeMember GetVirtualBaseClassAtIndex (uint32_t idx); @@ -288,37 +286,37 @@ const char* GetName(); - + const char * GetDisplayTypeName (); - + lldb::TypeClass GetTypeClass (); - + uint32_t GetNumberOfTemplateArguments (); - + lldb::SBType GetTemplateArgumentType (uint32_t idx); - + lldb::TemplateArgumentKind GetTemplateArgumentKind (uint32_t idx); - + lldb::SBType GetFunctionReturnType (); - + lldb::SBTypeList GetFunctionArgumentTypes (); - + uint32_t GetNumberOfMemberFunctions (); - + lldb::SBTypeMemberFunction GetMemberFunctionAtIndex (uint32_t idx); bool IsTypeComplete (); - + uint32_t GetTypeFlags (); @@ -335,31 +333,31 @@ template_args.append(self.GetTemplateArgumentType(i)) return template_args return None - + __swig_getmethods__["name"] = GetName if _newclass: name = property(GetName, None, doc='''A read only property that returns the name for this type as a string.''') - + __swig_getmethods__["size"] = GetByteSize if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns size in bytes for this type as an integer.''') - + __swig_getmethods__["is_pointer"] = IsPointerType if _newclass: is_pointer = property(IsPointerType, None, doc='''A read only property that returns a boolean value that indicates if this type is a pointer type.''') - + __swig_getmethods__["is_reference"] = IsReferenceType if _newclass: is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a reference type.''') - + __swig_getmethods__["is_function"] = IsFunctionType if _newclass: is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a function type.''') - + __swig_getmethods__["num_fields"] = GetNumberOfFields if _newclass: num_fields = property(GetNumberOfFields, None, doc='''A read only property that returns number of fields in this type as an integer.''') - + __swig_getmethods__["num_bases"] = GetNumberOfDirectBaseClasses if _newclass: num_bases = property(GetNumberOfDirectBaseClasses, None, doc='''A read only property that returns number of direct base classes in this type as an integer.''') - + __swig_getmethods__["num_vbases"] = GetNumberOfVirtualBaseClasses if _newclass: num_vbases = property(GetNumberOfVirtualBaseClasses, None, doc='''A read only property that returns number of virtual base classes in this type as an integer.''') - + __swig_getmethods__["num_template_args"] = GetNumberOfTemplateArguments if _newclass: num_template_args = property(GetNumberOfTemplateArguments, None, doc='''A read only property that returns number of template arguments in this type as an integer.''') @@ -368,7 +366,7 @@ __swig_getmethods__["type"] = GetTypeClass if _newclass: type = property(GetTypeClass, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eTypeClass") that represents a classification for this type.''') - + __swig_getmethods__["is_complete"] = IsTypeComplete if _newclass: is_complete = property(IsTypeComplete, None, doc='''A read only property that returns a boolean value that indicates if this type is a complete type (True) or a forward declaration (False).''') @@ -441,10 +439,10 @@ __swig_getmethods__["bases"] = get_bases_array if _newclass: bases = property(get_bases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the direct base classes for this type.''') - + __swig_getmethods__["vbases"] = get_vbases_array if _newclass: vbases = property(get_vbases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the virtual base classes for this type.''') - + __swig_getmethods__["fields"] = get_fields_array if _newclass: fields = property(get_fields_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the fields for this type.''') @@ -487,8 +485,7 @@ for type in type_list: # do something with type -... -") SBTypeList; +...") SBTypeList; class SBTypeList { public: Index: lldb/trunk/scripts/interface/SBTypeCategory.i =================================================================== --- lldb/trunk/scripts/interface/SBTypeCategory.i +++ lldb/trunk/scripts/interface/SBTypeCategory.i @@ -7,126 +7,125 @@ //===----------------------------------------------------------------------===// namespace lldb { - + %feature("docstring", - "Represents a category that can contain formatters for types. - ") SBTypeCategory; - + "Represents a category that can contain formatters for types.") SBTypeCategory; + class SBTypeCategory { public: - + SBTypeCategory(); - + SBTypeCategory (const lldb::SBTypeCategory &rhs); - + ~SBTypeCategory (); - + bool IsValid() const; explicit operator bool() const; - + bool GetEnabled (); - + void SetEnabled (bool); - + const char* GetName(); - + lldb::LanguageType GetLanguageAtIndex (uint32_t idx); - + uint32_t GetNumLanguages (); - + void AddLanguage (lldb::LanguageType language); - + bool - GetDescription (lldb::SBStream &description, + GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); - + uint32_t GetNumFormats (); - + uint32_t GetNumSummaries (); - + uint32_t GetNumFilters (); - + uint32_t GetNumSynthetics (); - + lldb::SBTypeNameSpecifier GetTypeNameSpecifierForFilterAtIndex (uint32_t); - + lldb::SBTypeNameSpecifier GetTypeNameSpecifierForFormatAtIndex (uint32_t); - + lldb::SBTypeNameSpecifier GetTypeNameSpecifierForSummaryAtIndex (uint32_t); lldb::SBTypeNameSpecifier GetTypeNameSpecifierForSyntheticAtIndex (uint32_t); - + lldb::SBTypeFilter GetFilterForType (lldb::SBTypeNameSpecifier); lldb::SBTypeFormat GetFormatForType (lldb::SBTypeNameSpecifier); - + lldb::SBTypeSummary GetSummaryForType (lldb::SBTypeNameSpecifier); lldb::SBTypeSynthetic GetSyntheticForType (lldb::SBTypeNameSpecifier); - + lldb::SBTypeFilter GetFilterAtIndex (uint32_t); - + lldb::SBTypeFormat GetFormatAtIndex (uint32_t); - + lldb::SBTypeSummary GetSummaryAtIndex (uint32_t); - + lldb::SBTypeSynthetic GetSyntheticAtIndex (uint32_t); - + bool AddTypeFormat (lldb::SBTypeNameSpecifier, lldb::SBTypeFormat); - + bool DeleteTypeFormat (lldb::SBTypeNameSpecifier); - + bool AddTypeSummary (lldb::SBTypeNameSpecifier, lldb::SBTypeSummary); - + bool DeleteTypeSummary (lldb::SBTypeNameSpecifier); - + bool AddTypeFilter (lldb::SBTypeNameSpecifier, lldb::SBTypeFilter); - + bool DeleteTypeFilter (lldb::SBTypeNameSpecifier); - + bool AddTypeSynthetic (lldb::SBTypeNameSpecifier, lldb::SBTypeSynthetic); - + bool DeleteTypeSynthetic (lldb::SBTypeNameSpecifier); - + %pythoncode %{ - + class formatters_access_class(object): '''A helper object that will lazily hand out formatters for a specific category.''' def __init__(self, sbcategory, get_count_function, get_at_index_function, get_by_name_function): @@ -222,7 +221,7 @@ __swig_getmethods__["synthetic"] = get_synthetics_access_object if _newclass: synthetic = property(get_synthetics_access_object, None, doc=r'''A read only property that returns an object that you can use to look for synthetic children provider by index or type name or regular expression.''') - + __swig_getmethods__["num_formats"] = GetNumFormats if _newclass: num_formats = property(GetNumFormats, None) __swig_getmethods__["num_summaries"] = GetNumSummaries @@ -231,10 +230,10 @@ if _newclass: num_filters = property(GetNumFilters, None) __swig_getmethods__["num_synthetics"] = GetNumSynthetics if _newclass: num_synthetics = property(GetNumSynthetics, None) - + __swig_getmethods__["name"] = GetName if _newclass: name = property(GetName, None) - + __swig_getmethods__["enabled"] = GetEnabled __swig_setmethods__["enabled"] = SetEnabled if _newclass: enabled = property(GetEnabled, SetEnabled) @@ -242,6 +241,6 @@ }; - + } // namespace lldb Index: lldb/trunk/scripts/interface/SBTypeFilter.i =================================================================== --- lldb/trunk/scripts/interface/SBTypeFilter.i +++ lldb/trunk/scripts/interface/SBTypeFilter.i @@ -7,70 +7,69 @@ //===----------------------------------------------------------------------===// namespace lldb { - + %feature("docstring", - "Represents a filter that can be associated to one or more types. - ") SBTypeFilter; - + "Represents a filter that can be associated to one or more types.") SBTypeFilter; + class SBTypeFilter { public: - + SBTypeFilter(); - + SBTypeFilter (uint32_t options); - + SBTypeFilter (const lldb::SBTypeFilter &rhs); - + ~SBTypeFilter (); - + bool IsValid() const; explicit operator bool() const; - + bool IsEqualTo (lldb::SBTypeFilter &rhs); - + uint32_t GetNumberOfExpressionPaths (); - + const char* GetExpressionPathAtIndex (uint32_t i); - + bool ReplaceExpressionPathAtIndex (uint32_t i, const char* item); - + void AppendExpressionPath (const char* item); - + void Clear(); - + uint32_t GetOptions(); - + void SetOptions (uint32_t); - + bool GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); - + bool operator == (lldb::SBTypeFilter &rhs); - + bool operator != (lldb::SBTypeFilter &rhs); - + %pythoncode %{ __swig_getmethods__["options"] = GetOptions __swig_setmethods__["options"] = SetOptions if _newclass: options = property(GetOptions, SetOptions) - + __swig_getmethods__["count"] = GetNumberOfExpressionPaths if _newclass: count = property(GetNumberOfExpressionPaths, None) %} - + }; } // namespace lldb Index: lldb/trunk/scripts/interface/SBTypeFormat.i =================================================================== --- lldb/trunk/scripts/interface/SBTypeFormat.i +++ lldb/trunk/scripts/interface/SBTypeFormat.i @@ -7,73 +7,72 @@ //===----------------------------------------------------------------------===// namespace lldb { - + %feature("docstring", - "Represents a format that can be associated to one or more types. - ") SBTypeFormat; - + "Represents a format that can be associated to one or more types.") SBTypeFormat; + class SBTypeFormat { public: - + SBTypeFormat(); - + SBTypeFormat (lldb::Format format, uint32_t options = 0); - + SBTypeFormat (const char* type, uint32_t options = 0); - + SBTypeFormat (const lldb::SBTypeFormat &rhs); - + ~SBTypeFormat (); - + bool IsValid() const; explicit operator bool() const; - + bool IsEqualTo (lldb::SBTypeFormat &rhs); - + lldb::Format GetFormat (); - + const char* GetTypeName (); - + uint32_t GetOptions(); - + void SetFormat (lldb::Format); - + void SetTypeName (const char*); - + void - SetOptions (uint32_t); - + SetOptions (uint32_t); + bool - GetDescription (lldb::SBStream &description, + GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); - + bool operator == (lldb::SBTypeFormat &rhs); bool operator != (lldb::SBTypeFormat &rhs); - + %pythoncode %{ __swig_getmethods__["format"] = GetFormat __swig_setmethods__["format"] = SetFormat if _newclass: format = property(GetFormat, SetFormat) - + __swig_getmethods__["options"] = GetOptions __swig_setmethods__["options"] = SetOptions - if _newclass: options = property(GetOptions, SetOptions) + if _newclass: options = property(GetOptions, SetOptions) %} }; - - + + } // namespace lldb Index: lldb/trunk/scripts/interface/SBTypeNameSpecifier.i =================================================================== --- lldb/trunk/scripts/interface/SBTypeNameSpecifier.i +++ lldb/trunk/scripts/interface/SBTypeNameSpecifier.i @@ -7,63 +7,62 @@ //===----------------------------------------------------------------------===// namespace lldb { - + %feature("docstring", - "Represents a general way to provide a type name to LLDB APIs. - ") SBTypeNameSpecifier; - + "Represents a general way to provide a type name to LLDB APIs.") SBTypeNameSpecifier; + class SBTypeNameSpecifier { public: - + SBTypeNameSpecifier(); - + SBTypeNameSpecifier (const char* name, bool is_regex = false); - + SBTypeNameSpecifier (SBType type); - + SBTypeNameSpecifier (const lldb::SBTypeNameSpecifier &rhs); - + ~SBTypeNameSpecifier (); - + bool IsValid() const; explicit operator bool() const; - + bool IsEqualTo (lldb::SBTypeNameSpecifier &rhs); - + const char* GetName(); - + lldb::SBType GetType (); - + bool IsRegex(); - + bool - GetDescription (lldb::SBStream &description, + GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); - + bool operator == (lldb::SBTypeNameSpecifier &rhs); bool operator != (lldb::SBTypeNameSpecifier &rhs); - + %pythoncode %{ __swig_getmethods__["name"] = GetName if _newclass: name = property(GetName, None) - + __swig_getmethods__["is_regex"] = IsRegex if _newclass: is_regex = property(IsRegex, None) %} - + }; - + } // namespace lldb Index: lldb/trunk/scripts/interface/SBTypeSummary.i =================================================================== --- lldb/trunk/scripts/interface/SBTypeSummary.i +++ lldb/trunk/scripts/interface/SBTypeSummary.i @@ -11,102 +11,101 @@ { public: SBTypeSummaryOptions(); - + SBTypeSummaryOptions (const lldb::SBTypeSummaryOptions &rhs); - + ~SBTypeSummaryOptions (); - + bool IsValid (); explicit operator bool() const; - + lldb::LanguageType GetLanguage (); - + lldb::TypeSummaryCapping GetCapping (); - + void SetLanguage (lldb::LanguageType); - + void SetCapping (lldb::TypeSummaryCapping); }; %feature("docstring", - "Represents a summary that can be associated to one or more types. - ") SBTypeSummary; - + "Represents a summary that can be associated to one or more types.") SBTypeSummary; + class SBTypeSummary { public: - + SBTypeSummary(); - + static SBTypeSummary CreateWithSummaryString (const char* data, uint32_t options = 0); - + static SBTypeSummary CreateWithFunctionName (const char* data, uint32_t options = 0); - + static SBTypeSummary CreateWithScriptCode (const char* data, uint32_t options = 0); - + SBTypeSummary (const lldb::SBTypeSummary &rhs); - + ~SBTypeSummary (); - + bool IsValid() const; explicit operator bool() const; - + bool IsEqualTo (lldb::SBTypeSummary &rhs); - + bool IsFunctionCode(); - + bool IsFunctionName(); - + bool IsSummaryString(); - + const char* GetData (); - + void SetSummaryString (const char* data); - + void SetFunctionName (const char* data); - + void SetFunctionCode (const char* data); - + uint32_t GetOptions (); void SetOptions (uint32_t); - + bool - GetDescription (lldb::SBStream &description, + GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); - + bool operator == (lldb::SBTypeSummary &rhs); - + bool operator != (lldb::SBTypeSummary &rhs); - + %pythoncode %{ __swig_getmethods__["options"] = GetOptions __swig_setmethods__["options"] = SetOptions if _newclass: options = property(GetOptions, SetOptions) - + __swig_getmethods__["is_summary_string"] = IsSummaryString if _newclass: is_summary_string = property(IsSummaryString, None) @@ -119,7 +118,7 @@ __swig_getmethods__["summary_data"] = GetData if _newclass: summary_data = property(GetData, None) %} - + }; } // namespace lldb Index: lldb/trunk/scripts/interface/SBTypeSynthetic.i =================================================================== --- lldb/trunk/scripts/interface/SBTypeSynthetic.i +++ lldb/trunk/scripts/interface/SBTypeSynthetic.i @@ -7,75 +7,74 @@ //===----------------------------------------------------------------------===// namespace lldb { - + %feature("docstring", - "Represents a summary that can be associated to one or more types. - ") SBTypeSynthetic; - + "Represents a summary that can be associated to one or more types.") SBTypeSynthetic; + class SBTypeSynthetic { public: - + SBTypeSynthetic(); - + static lldb::SBTypeSynthetic CreateWithClassName (const char* data, uint32_t options = 0); - + static lldb::SBTypeSynthetic CreateWithScriptCode (const char* data, uint32_t options = 0); - + SBTypeSynthetic (const lldb::SBTypeSynthetic &rhs); - + ~SBTypeSynthetic (); - + bool IsValid() const; explicit operator bool() const; - + bool IsEqualTo (lldb::SBTypeSynthetic &rhs); - + bool IsClassCode(); - + const char* GetData (); - + void SetClassName (const char* data); - + void SetClassCode (const char* data); uint32_t GetOptions (); - + void SetOptions (uint32_t); - + bool - GetDescription (lldb::SBStream &description, + GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); - + bool operator == (lldb::SBTypeSynthetic &rhs); bool operator != (lldb::SBTypeSynthetic &rhs); - + %pythoncode %{ __swig_getmethods__["options"] = GetOptions __swig_setmethods__["options"] = SetOptions if _newclass: options = property(GetOptions, SetOptions) - + __swig_getmethods__["contains_code"] = IsClassCode if _newclass: contains_code = property(IsClassCode, None) - + __swig_getmethods__["synthetic_data"] = GetData if _newclass: synthetic_data = property(GetData, None) %} - + }; - + } // namespace lldb Index: lldb/trunk/scripts/interface/SBValue.i =================================================================== --- lldb/trunk/scripts/interface/SBValue.i +++ lldb/trunk/scripts/interface/SBValue.i @@ -67,22 +67,22 @@ IsValid(); explicit operator bool() const; - + void Clear(); - + SBError GetError(); lldb::user_id_t GetID (); - + const char * GetName(); const char * GetTypeName (); - + const char * GetDisplayTypeName (); @@ -94,7 +94,7 @@ lldb::Format GetFormat (); - + void SetFormat (lldb::Format format); @@ -106,10 +106,10 @@ uint64_t GetValueAsUnsigned(SBError& error, uint64_t fail_value=0); - + int64_t GetValueAsSigned(int64_t fail_value=0); - + uint64_t GetValueAsUnsigned(uint64_t fail_value=0); @@ -121,47 +121,47 @@ const char * GetSummary (); - + const char * GetSummary (lldb::SBStream& stream, lldb::SBTypeSummaryOptions& options); - + const char * GetObjectDescription (); - + const char * GetTypeValidatorResult (); lldb::SBValue GetDynamicValue (lldb::DynamicValueType use_dynamic); - + lldb::SBValue GetStaticValue (); - + lldb::SBValue GetNonSyntheticValue (); lldb::DynamicValueType GetPreferDynamicValue (); - + void SetPreferDynamicValue (lldb::DynamicValueType use_dynamic); - + bool GetPreferSyntheticValue (); - + void SetPreferSyntheticValue (bool use_synthetic); - + bool IsDynamic(); - + bool IsSynthetic (); - + bool IsSyntheticChildrenGenerated (); - + void SetSyntheticChildrenGenerated (bool); @@ -176,13 +176,13 @@ lldb::SBTypeFormat GetTypeFormat (); - + lldb::SBTypeSummary GetTypeSummary (); - + lldb::SBTypeFilter GetTypeFilter (); - + lldb::SBTypeSynthetic GetTypeSynthetic (); @@ -190,82 +190,79 @@ GetChildAtIndex (uint32_t idx); %feature("docstring", " - //------------------------------------------------------------------ - /// Get a child value by index from a value. - /// - /// Structs, unions, classes, arrays and pointers have child - /// values that can be access by index. - /// - /// Structs and unions access child members using a zero based index - /// for each child member. For - /// - /// Classes reserve the first indexes for base classes that have - /// members (empty base classes are omitted), and all members of the - /// current class will then follow the base classes. - /// - /// Pointers differ depending on what they point to. If the pointer - /// points to a simple type, the child at index zero - /// is the only child value available, unless \a synthetic_allowed - /// is \b true, in which case the pointer will be used as an array - /// and can create 'synthetic' child values using positive or - /// negative indexes. If the pointer points to an aggregate type - /// (an array, class, union, struct), then the pointee is - /// transparently skipped and any children are going to be the indexes - /// of the child values within the aggregate type. For example if - /// we have a 'Point' type and we have a SBValue that contains a - /// pointer to a 'Point' type, then the child at index zero will be - /// the 'x' member, and the child at index 1 will be the 'y' member - /// (the child at index zero won't be a 'Point' instance). - /// - /// If you actually need an SBValue that represents the type pointed - /// to by a SBValue for which GetType().IsPointeeType() returns true, - /// regardless of the pointee type, you can do that with the SBValue.Dereference - /// method (or the equivalent deref property). - /// - /// Arrays have a preset number of children that can be accessed by - /// index and will returns invalid child values for indexes that are - /// out of bounds unless the \a synthetic_allowed is \b true. In this - /// case the array can create 'synthetic' child values for indexes - /// that aren't in the array bounds using positive or negative - /// indexes. - /// - /// @param[in] idx - /// The index of the child value to get - /// - /// @param[in] use_dynamic - /// An enumeration that specifies whether to get dynamic values, - /// and also if the target can be run to figure out the dynamic - /// type of the child value. - /// - /// @param[in] synthetic_allowed - /// If \b true, then allow child values to be created by index - /// for pointers and arrays for indexes that normally wouldn't - /// be allowed. - /// - /// @return - /// A new SBValue object that represents the child member value. - //------------------------------------------------------------------ - ") GetChildAtIndex; + Get a child value by index from a value. + + Structs, unions, classes, arrays and pointers have child + values that can be access by index. + + Structs and unions access child members using a zero based index + for each child member. For + + Classes reserve the first indexes for base classes that have + members (empty base classes are omitted), and all members of the + current class will then follow the base classes. + + Pointers differ depending on what they point to. If the pointer + points to a simple type, the child at index zero + is the only child value available, unless \a synthetic_allowed + is \b true, in which case the pointer will be used as an array + and can create 'synthetic' child values using positive or + negative indexes. If the pointer points to an aggregate type + (an array, class, union, struct), then the pointee is + transparently skipped and any children are going to be the indexes + of the child values within the aggregate type. For example if + we have a 'Point' type and we have a SBValue that contains a + pointer to a 'Point' type, then the child at index zero will be + the 'x' member, and the child at index 1 will be the 'y' member + (the child at index zero won't be a 'Point' instance). + + If you actually need an SBValue that represents the type pointed + to by a SBValue for which GetType().IsPointeeType() returns true, + regardless of the pointee type, you can do that with the SBValue.Dereference + method (or the equivalent deref property). + + Arrays have a preset number of children that can be accessed by + index and will returns invalid child values for indexes that are + out of bounds unless the \a synthetic_allowed is \b true. In this + case the array can create 'synthetic' child values for indexes + that aren't in the array bounds using positive or negative + indexes. + + @param[in] idx + The index of the child value to get + + @param[in] use_dynamic + An enumeration that specifies whether to get dynamic values, + and also if the target can be run to figure out the dynamic + type of the child value. + + @param[in] synthetic_allowed + If \b true, then allow child values to be created by index + for pointers and arrays for indexes that normally wouldn't + be allowed. + + @return + A new SBValue object that represents the child member value.") GetChildAtIndex; lldb::SBValue - GetChildAtIndex (uint32_t idx, + GetChildAtIndex (uint32_t idx, lldb::DynamicValueType use_dynamic, bool can_create_synthetic); lldb::SBValue CreateChildAtOffset (const char *name, uint32_t offset, lldb::SBType type); - + lldb::SBValue SBValue::Cast (lldb::SBType type); lldb::SBValue CreateValueFromExpression (const char *name, const char* expression); - + lldb::SBValue CreateValueFromExpression (const char *name, const char* expression, SBExpressionOptions &options); lldb::SBValue CreateValueFromAddress(const char* name, lldb::addr_t address, lldb::SBType type); - + lldb::SBValue CreateValueFromData (const char* name, lldb::SBData data, @@ -273,21 +270,18 @@ lldb::SBType GetType(); - + %feature("docstring", " - //------------------------------------------------------------------ - /// Returns the child member index. - /// - /// Matches children of this object only and will match base classes and - /// member names if this is a clang typed object. - /// - /// @param[in] name - /// The name of the child value to get - /// - /// @return - /// An index to the child member value. - //------------------------------------------------------------------ - ") GetIndexOfChildWithName; + Returns the child member index. + + Matches children of this object only and will match base classes and + member names if this is a clang typed object. + + @param[in] name + The name of the child value to get + + @return + An index to the child member value.") GetIndexOfChildWithName; uint32_t GetIndexOfChildWithName (const char *name); @@ -295,27 +289,24 @@ GetChildMemberWithName (const char *name); %feature("docstring", " - //------------------------------------------------------------------ - /// Returns the child member value. - /// - /// Matches child members of this object and child members of any base - /// classes. - /// - /// @param[in] name - /// The name of the child value to get - /// - /// @param[in] use_dynamic - /// An enumeration that specifies whether to get dynamic values, - /// and also if the target can be run to figure out the dynamic - /// type of the child value. - /// - /// @return - /// A new SBValue object that represents the child member value. - //------------------------------------------------------------------ - ") GetChildMemberWithName; + Returns the child member value. + + Matches child members of this object and child members of any base + classes. + + @param[in] name + The name of the child value to get + + @param[in] use_dynamic + An enumeration that specifies whether to get dynamic values, + and also if the target can be run to figure out the dynamic + type of the child value. + + @return + A new SBValue object that represents the child member value.") GetChildMemberWithName; lldb::SBValue GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dynamic); - + %feature("docstring", "Expands nested expressions like .a->b[0].c[1]->d." ) GetValueForExpressionPath; lldb::SBValue @@ -323,10 +314,10 @@ lldb::SBDeclaration GetDeclaration (); - + bool MightHaveChildren (); - + bool IsRuntimeSupportValue (); @@ -334,17 +325,14 @@ GetNumChildren (); %feature("doctstring", " - //------------------------------------------------------------------ - /// Returns the number for children. - /// - /// @param[in] max - /// If max is less the lldb.UINT32_MAX, then the returned value is - /// capped to max. - /// - /// @return - /// An integer value capped to the argument max. - //------------------------------------------------------------------ - ") GetNumChildren; + Returns the number for children. + + @param[in] max + If max is less the lldb.UINT32_MAX, then the returned value is + capped to max. + + @return + An integer value capped to the argument max.") GetNumChildren; uint32_t GetNumChildren (uint32_t max); @@ -356,33 +344,31 @@ lldb::SBValue AddressOf(); - + bool TypeIsPointerType (); - + lldb::SBTarget GetTarget(); lldb::SBProcess GetProcess(); - + lldb::SBThread GetThread(); - + lldb::SBFrame GetFrame(); - + %feature("docstring", " - /// Find and watch a variable. - /// It returns an SBWatchpoint, which may be invalid. - ") Watch; + Find and watch a variable. + It returns an SBWatchpoint, which may be invalid.") Watch; lldb::SBWatchpoint Watch (bool resolve_location, bool read, bool write, SBError &error); %feature("docstring", " - /// Find and watch the location pointed to by a variable. - /// It returns an SBWatchpoint, which may be invalid. - ") WatchPointee; + Find and watch the location pointed to by a variable. + It returns an SBWatchpoint, which may be invalid.") WatchPointee; lldb::SBWatchpoint WatchPointee (bool resolve_location, bool read, bool write, SBError &error); @@ -393,47 +379,41 @@ GetExpressionPath (lldb::SBStream &description); %feature("docstring", " - //------------------------------------------------------------------ - /// Get an SBData wrapping what this SBValue points to. - /// - /// This method will dereference the current SBValue, if its - /// data type is a T* or T[], and extract item_count elements - /// of type T from it, copying their contents in an SBData. - /// - /// @param[in] item_idx - /// The index of the first item to retrieve. For an array - /// this is equivalent to array[item_idx], for a pointer - /// to *(pointer + item_idx). In either case, the measurement - /// unit for item_idx is the sizeof(T) rather than the byte - /// - /// @param[in] item_count - /// How many items should be copied into the output. By default - /// only one item is copied, but more can be asked for. - /// - /// @return - /// An SBData with the contents of the copied items, on success. - /// An empty SBData otherwise. - //------------------------------------------------------------------ - ") GetPointeeData; + Get an SBData wrapping what this SBValue points to. + + This method will dereference the current SBValue, if its + data type is a T* or T[], and extract item_count elements + of type T from it, copying their contents in an SBData. + + @param[in] item_idx + The index of the first item to retrieve. For an array + this is equivalent to array[item_idx], for a pointer + to *(pointer + item_idx). In either case, the measurement + unit for item_idx is the sizeof(T) rather than the byte + + @param[in] item_count + How many items should be copied into the output. By default + only one item is copied, but more can be asked for. + + @return + An SBData with the contents of the copied items, on success. + An empty SBData otherwise.") GetPointeeData; lldb::SBData GetPointeeData (uint32_t item_idx = 0, uint32_t item_count = 1); %feature("docstring", " - //------------------------------------------------------------------ - /// Get an SBData wrapping the contents of this SBValue. - /// - /// This method will read the contents of this object in memory - /// and copy them into an SBData for future use. - /// - /// @return - /// An SBData with the contents of this SBValue, on success. - /// An empty SBData otherwise. - //------------------------------------------------------------------ - ") GetData; + Get an SBData wrapping the contents of this SBValue. + + This method will read the contents of this object in memory + and copy them into an SBData for future use. + + @return + An SBData with the contents of this SBValue, on success. + An empty SBData otherwise.") GetData; lldb::SBData GetData (); - + bool SetData (lldb::SBData &data, lldb::SBError& error); @@ -442,10 +422,10 @@ lldb::SBAddress GetAddress(); - + lldb::SBValue Persist (); - + %feature("docstring", "Returns an expression path for this value." ) GetExpressionPath; bool @@ -467,13 +447,13 @@ def __get_dynamic__ (self): '''Helper function for the "SBValue.dynamic" property.''' return self.GetDynamicValue (eDynamicCanRunTarget) - + class children_access(object): '''A helper object that will lazily hand out thread for a process when supplied an index.''' - + def __init__(self, sbvalue): self.sbvalue = sbvalue - + def __len__(self): if self.sbvalue: return int(self.sbvalue.GetNumChildren()) @@ -483,11 +463,11 @@ if type(key) is int and key < len(self): return self.sbvalue.GetChildAtIndex(key) return None - + def get_child_access_object(self): '''An accessor function that returns a children_access() object which allows lazy member variable access from a lldb.SBValue object.''' return self.children_access (self) - + def get_value_child_list(self): '''An accessor function that returns a list() that contains all children in a lldb.SBValue object.''' children = [] @@ -503,10 +483,10 @@ def __len__(self): '''Return the number of child values of a lldb.SBValue object.''' return self.GetNumChildren() - + __swig_getmethods__["children"] = get_value_child_list if _newclass: children = property(get_value_child_list, None, doc='''A read only property that returns a list() of lldb.SBValue objects for the children of the value.''') - + __swig_getmethods__["child"] = get_child_access_object if _newclass: child = property(get_child_access_object, None, doc='''A read only property that returns an object that can access children of a variable by index (child_value = value.children[12]).''') @@ -553,16 +533,16 @@ __swig_getmethods__["error"] = GetError if _newclass: error = property(GetError, None, doc='''A read only property that returns the lldb.SBError that represents the error from the last time the variable value was calculated.''') - + __swig_getmethods__["summary"] = GetSummary if _newclass: summary = property(GetSummary, None, doc='''A read only property that returns the summary for this value as a string''') __swig_getmethods__["description"] = GetObjectDescription if _newclass: description = property(GetObjectDescription, None, doc='''A read only property that returns the language-specific description of this value as a string''') - + __swig_getmethods__["dynamic"] = __get_dynamic__ if _newclass: dynamic = property(__get_dynamic__, None, doc='''A read only property that returns an lldb.SBValue that is created by finding the dynamic type of this value.''') - + __swig_getmethods__["location"] = GetLocation if _newclass: location = property(GetLocation, None, doc='''A read only property that returns the location of this value as a string.''') @@ -591,21 +571,21 @@ s = SBStream() self.GetExpressionPath (s) return s.GetData() - + __swig_getmethods__["path"] = get_expr_path if _newclass: path = property(get_expr_path, None, doc='''A read only property that returns the expression path that one can use to reach this value in an expression.''') - + def synthetic_child_from_expression(self, name, expr, options=None): if options is None: options = lldb.SBExpressionOptions() child = self.CreateValueFromExpression(name, expr, options) child.SetSyntheticChildrenGenerated(True) return child - + def synthetic_child_from_data(self, name, data, type): child = self.CreateValueFromData(name, data, type) child.SetSyntheticChildrenGenerated(True) return child - + def synthetic_child_from_address(self, name, addr, type): child = self.CreateValueFromAddress(name, addr, type) child.SetSyntheticChildrenGenerated(True) Index: lldb/trunk/scripts/interface/SBValueList.i =================================================================== --- lldb/trunk/scripts/interface/SBValueList.i +++ lldb/trunk/scripts/interface/SBValueList.i @@ -79,8 +79,8 @@ IsValid() const; explicit operator bool() const; - - void + + void Clear(); void @@ -97,10 +97,10 @@ lldb::SBValue FindValueObjectByUID (lldb::user_id_t uid); - + lldb::SBValue GetFirstValueByName (const char* name) const; - + %pythoncode %{ def __iter__(self): '''Iterate over all values in a lldb.SBValueList object.''' Index: lldb/trunk/scripts/interface/SBVariablesOptions.i =================================================================== --- lldb/trunk/scripts/interface/SBVariablesOptions.i +++ lldb/trunk/scripts/interface/SBVariablesOptions.i @@ -7,24 +7,24 @@ //===----------------------------------------------------------------------===// namespace lldb { - + class SBVariablesOptions { public: SBVariablesOptions (); - + SBVariablesOptions (const SBVariablesOptions& options); - + ~SBVariablesOptions (); - + bool IsValid () const; explicit operator bool() const; - + bool GetIncludeArguments () const; - + void SetIncludeArguments (bool); @@ -36,33 +36,33 @@ bool GetIncludeLocals () const; - + void SetIncludeLocals (bool); - + bool GetIncludeStatics () const; - + void SetIncludeStatics (bool); - + bool GetInScopeOnly () const; - + void SetInScopeOnly (bool); - + bool GetIncludeRuntimeSupportValues () const; - + void SetIncludeRuntimeSupportValues (bool); - + lldb::DynamicValueType GetUseDynamic () const; - + void SetUseDynamic (lldb::DynamicValueType); }; - + } // namespace lldb Index: lldb/trunk/scripts/interface/SBWatchpoint.i =================================================================== --- lldb/trunk/scripts/interface/SBWatchpoint.i +++ lldb/trunk/scripts/interface/SBWatchpoint.i @@ -43,10 +43,7 @@ GetID (); %feature("docstring", " - //------------------------------------------------------------------ - /// With -1 representing an invalid hardware index. - //------------------------------------------------------------------ - ") GetHardwareIndex; + With -1 representing an invalid hardware index.") GetHardwareIndex; int32_t GetHardwareIndex (); @@ -72,27 +69,21 @@ SetIgnoreCount (uint32_t n); %feature("docstring", " - //------------------------------------------------------------------ - /// Get the condition expression for the watchpoint. - //------------------------------------------------------------------ - ") GetCondition; + Get the condition expression for the watchpoint.") GetCondition; const char * GetCondition (); %feature("docstring", " - //-------------------------------------------------------------------------- - /// The watchpoint stops only if the condition expression evaluates to true. - //-------------------------------------------------------------------------- - ") SetCondition; - void + The watchpoint stops only if the condition expression evaluates to true.") SetCondition; + void SetCondition (const char *condition); - + bool GetDescription (lldb::SBStream &description, DescriptionLevel level); static bool EventIsWatchpointEvent (const lldb::SBEvent &event); - + static lldb::WatchpointEventType GetWatchpointEventTypeFromEvent (const lldb::SBEvent& event);