Add some more docstrings for SBCompileUnit and SBBreakpoint, plus incorporate the doxgen doc block of

SBValue::GetChildAtIndex(uint32_t idx, 
                         lldb::DynamicValueType use_dynamic,
                         bool can_create_synthetic);

into the SBValue docstrings.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135295 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/lldb/API/SBBreakpoint.h b/include/lldb/API/SBBreakpoint.h
index a621ae8..96bd2cf 100644
--- a/include/lldb/API/SBBreakpoint.h
+++ b/include/lldb/API/SBBreakpoint.h
@@ -71,6 +71,12 @@
 
         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/include/lldb/API/SBCompileUnit.h b/include/lldb/API/SBCompileUnit.h
index 530aad0..53f8e83 100644
--- a/include/lldb/API/SBCompileUnit.h
+++ b/include/lldb/API/SBCompileUnit.h
@@ -17,7 +17,32 @@
 
 #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/include/lldb/API/SBValue.h b/include/lldb/API/SBValue.h
index be869f8..5bc29b8 100644
--- a/include/lldb/API/SBValue.h
+++ b/include/lldb/API/SBValue.h
@@ -150,6 +150,9 @@
     lldb::SBValue
     GetChildAtIndex (uint32_t idx);
 
+#ifdef SWIG
+    %feature("docstring", "
+#endif
     //------------------------------------------------------------------
     /// Get a child value by index from a value.
     ///
@@ -167,20 +170,20 @@
     /// 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 @@
     /// @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/scripts/Python/modify-python-lldb.py b/scripts/Python/modify-python-lldb.py
index c33a3dd..cc24ab6 100644
--- a/scripts/Python/modify-python-lldb.py
+++ b/scripts/Python/modify-python-lldb.py
@@ -223,7 +223,7 @@
                 # 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 @@
             # 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: