[Lldb-commits] [lldb] r134652 - in /lldb/trunk/include/lldb/API: SBSymbol.h SBSymbolContextList.h
Johnny Chen
johnny.chen at apple.com
Thu Jul 7 15:48:47 PDT 2011
Author: johnny
Date: Thu Jul 7 17:48:46 2011
New Revision: 134652
URL: http://llvm.org/viewvc/llvm-project?rev=134652&view=rev
Log:
Add docstrings for SBSymbolContextList with example usage.
Modified:
lldb/trunk/include/lldb/API/SBSymbol.h
lldb/trunk/include/lldb/API/SBSymbolContextList.h
Modified: lldb/trunk/include/lldb/API/SBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbol.h?rev=134652&r1=134651&r2=134652&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbol.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbol.h Thu Jul 7 17:48:46 2011
@@ -19,7 +19,7 @@
#ifdef SWIG
%feature("docstring",
- "Represents the symbol associated with a stack frame."
+ "Represents the symbol possibly associated with a stack frame."
) SBSymbol;
#endif
class SBSymbol
Modified: lldb/trunk/include/lldb/API/SBSymbolContextList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbolContextList.h?rev=134652&r1=134651&r2=134652&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbolContextList.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbolContextList.h Thu Jul 7 17:48:46 2011
@@ -15,8 +15,35 @@
namespace lldb {
+#ifdef SWIG
+%feature("docstring",
+"Represents a list of symbol context object. See also SBSymbolContext.
+
+For example (from test/python_api/target/TestTargetAPI.py),
+
+ def find_functions(self, exe_name):
+ '''Exercise SBTaget.FindFunctions() API.'''
+ exe = os.path.join(os.getcwd(), exe_name)
+
+ # Create a target by the debugger.
+ target = self.dbg.CreateTarget(exe)
+ self.assertTrue(target, VALID_TARGET)
+
+ list = lldb.SBSymbolContextList()
+ num = target.FindFunctions('c', lldb.eFunctionNameTypeAuto, False, list)
+ self.assertTrue(num == 1 and list.GetSize() == 1)
+
+ for sc in list:
+ self.assertTrue(sc.GetModule().GetFileSpec().GetFilename() == exe_name)
+ self.assertTrue(sc.GetSymbol().GetName() == 'c')
+"
+ ) SBSymbolContextList;
+#endif
class SBSymbolContextList
{
+#ifdef SWIG
+ %feature("autodoc", "1");
+#endif
public:
SBSymbolContextList ();
More information about the lldb-commits
mailing list