diff --git a/lldb/include/lldb/API/SBBreakpoint.h b/lldb/include/lldb/API/SBBreakpoint.h index a621ae88624c..96bd2cff4eaf 100644 --- a/lldb/include/lldb/API/SBBreakpoint.h +++ b/lldb/include/lldb/API/SBBreakpoint.h @@ -71,6 +71,12 @@ TestBreakpointIgnoreCount.py), process.Continue() +SBBreakpoint supports breakpoint location iteration. For example, + + for bl in breakpoint: + print 'breakpoint location load addr: %s' % hex(bl.GetLoadAddress()) + print 'breakpoint location condition: %s' % hex(bl.GetCondition()) + " ) SBBreakpoint; #endif diff --git a/lldb/include/lldb/API/SBCompileUnit.h b/lldb/include/lldb/API/SBCompileUnit.h index 530aad008736..53f8e83d8ec5 100644 --- a/lldb/include/lldb/API/SBCompileUnit.h +++ b/lldb/include/lldb/API/SBCompileUnit.h @@ -17,7 +17,32 @@ namespace lldb { #ifdef SWIG %feature("docstring", - "Represents a compilation unit, or compiled source file." +"Represents a compilation unit, or compiled source file. + +SBCompileUnit supports line entry iteration. For example, + + for lineEntry in compileUnit: + print 'line entry: %s:%d' % (str(lineEntry.GetFileSpec()), + lineEntry.GetLine()) + print 'start addr: %s' % str(lineEntry.GetStartAddress()) + print 'end addr: %s' % str(lineEntry.GetEndAddress()) + +produces: + +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20 +start addr: a.out[0x100000d98] +end addr: a.out[0x100000da3] +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21 +start addr: a.out[0x100000da3] +end addr: a.out[0x100000da9] +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22 +start addr: a.out[0x100000da9] +end addr: a.out[0x100000db6] +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23 +start addr: a.out[0x100000db6] +end addr: a.out[0x100000dbc] +... +" ) SBCompileUnit; #endif class SBCompileUnit diff --git a/lldb/include/lldb/API/SBValue.h b/lldb/include/lldb/API/SBValue.h index be869f89f004..5bc29b8f3c48 100644 --- a/lldb/include/lldb/API/SBValue.h +++ b/lldb/include/lldb/API/SBValue.h @@ -150,6 +150,9 @@ public: lldb::SBValue GetChildAtIndex (uint32_t idx); +#ifdef SWIG + %feature("docstring", " +#endif //------------------------------------------------------------------ /// Get a child value by index from a value. /// @@ -167,20 +170,20 @@ public: /// 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 + /// 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). + /// 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). /// /// 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 + /// case the array can create 'synthetic' child values for indexes /// that aren't in the array bounds using positive or negative /// indexes. /// @@ -200,6 +203,9 @@ public: /// @return /// A new SBValue object that represents the child member value. //------------------------------------------------------------------ +#ifdef SWIG + ") GetChildAtIndex; +#endif lldb::SBValue GetChildAtIndex (uint32_t idx, lldb::DynamicValueType use_dynamic, diff --git a/lldb/scripts/Python/modify-python-lldb.py b/lldb/scripts/Python/modify-python-lldb.py index c33a3dd2ce01..cc24ab661899 100644 --- a/lldb/scripts/Python/modify-python-lldb.py +++ b/lldb/scripts/Python/modify-python-lldb.py @@ -223,7 +223,7 @@ for line in content.splitlines(): # Adding support for eq and ne for the matched SB class. state |= DEFINING_EQUALITY - elif (state & DEFINING_ITERATOR) or (state & DEFINING_EQUALITY): + if (state & DEFINING_ITERATOR) or (state & DEFINING_EQUALITY): match = init_pattern.search(line) if match: # We found the beginning of the __init__ method definition. @@ -244,15 +244,16 @@ for line in content.splitlines(): # Next state will be NORMAL. state = NORMAL - elif (state & CLEANUP_DOCSTRING): + if (state & CLEANUP_DOCSTRING): # Cleanse the lldb.py of the autodoc'ed residues. if c_ifdef_swig in line or c_endif_swig in line: continue # As well as the comment marker line and trailing blank line. if c_comment_marker in line or line == trailing_blank_line: continue - # Also remove the '\a ' substrings. + # Also remove the '\a ' and '\b 'substrings. line = line.replace('\a ', '') + line = line.replace('\b ', '') # And the leading '///' substring. doxygen_comment_match = doxygen_comment_start.match(line) if doxygen_comment_match: