summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-07-07 20:23:22 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-07-07 20:23:22 +0000
commit28597319fd2fd8a226f43e4abb1a6f6fd25a1e6d (patch)
treedb8aa74c2b8fe631a03ba2a19c973c935edd9b58
parentefa67767191e4a76f464dd253ce60f269d92c30d (diff)
downloadbcm5719-llvm-28597319fd2fd8a226f43e4abb1a6f6fd25a1e6d.tar.gz
bcm5719-llvm-28597319fd2fd8a226f43e4abb1a6f6fd25a1e6d.zip
Add docstrings for SBValueList with example usage.
llvm-svn: 134632
-rw-r--r--lldb/include/lldb/API/SBValueList.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/lldb/include/lldb/API/SBValueList.h b/lldb/include/lldb/API/SBValueList.h
index 578f62e6d7d..364ed91ee8a 100644
--- a/lldb/include/lldb/API/SBValueList.h
+++ b/lldb/include/lldb/API/SBValueList.h
@@ -14,8 +14,71 @@
namespace lldb {
+#ifdef SWIG
+%feature("docstring",
+"Represents a collection of SBValues. Both SBFrame's GetVariables() and
+GetRegisters() return a SBValueList.
+
+For example (from test/lldbutil.py),
+
+def get_registers(frame, kind):
+ '''Returns the registers given the frame and the kind of registers desired.
+
+ Returns None if there's no such kind.
+ '''
+ registerSet = frame.GetRegisters() # Return type of SBValueList.
+ for value in registerSet:
+ if kind.lower() in value.GetName().lower():
+ return value
+
+ return None
+
+def get_GPRs(frame):
+ '''Returns the general purpose registers of the frame as an SBValue.
+
+ The returned SBValue object is iterable. An example:
+ ...
+ from lldbutil import get_GPRs
+ regs = get_GPRs(frame)
+ for reg in regs:
+ print '%s => %s' % (reg.GetName(), reg.GetValue())
+ ...
+ '''
+ return get_registers(frame, 'general purpose')
+
+def get_FPRs(frame):
+ '''Returns the floating point registers of the frame as an SBValue.
+
+ The returned SBValue object is iterable. An example:
+ ...
+ from lldbutil import get_FPRs
+ regs = get_FPRs(frame)
+ for reg in regs:
+ print '%s => %s' % (reg.GetName(), reg.GetValue())
+ ...
+ '''
+ return get_registers(frame, 'floating point')
+
+def get_ESRs(frame):
+ '''Returns the exception state registers of the frame as an SBValue.
+
+ The returned SBValue object is iterable. An example:
+ ...
+ from lldbutil import get_ESRs
+ regs = get_ESRs(frame)
+ for reg in regs:
+ print '%s => %s' % (reg.GetName(), reg.GetValue())
+ ...
+ '''
+ return get_registers(frame, 'exception state')
+"
+ ) SBValueList;
+#endif
class SBValueList
{
+#ifdef SWIG
+ %feature("autodoc", "1");
+#endif
public:
SBValueList ();
OpenPOWER on IntegriCloud