Add more docstrings for get_GPRs(frame), getFPRs(frame), and get_ESRs(frame).

llvm-svn: 131168
This commit is contained in:
Johnny Chen 2011-05-10 23:01:44 +00:00
parent 40362a44c0
commit e9e8689f3b
1 changed files with 21 additions and 3 deletions

View File

@ -442,20 +442,38 @@ def get_registers(frame, kind):
def get_GPRs(frame): def get_GPRs(frame):
"""Returns the general purpose registers of the frame as an SBValue. """Returns the general purpose registers of the frame as an SBValue.
The returned SBValue object is iterable. 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") return get_registers(frame, "general purpose")
def get_FPRs(frame): def get_FPRs(frame):
"""Returns the floating point registers of the frame as an SBValue. """Returns the floating point registers of the frame as an SBValue.
The returned SBValue object is iterable. 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") return get_registers(frame, "floating point")
def get_ESRs(frame): def get_ESRs(frame):
"""Returns the exception state registers of the frame as an SBValue. """Returns the exception state registers of the frame as an SBValue.
The returned SBValue object is iterable. 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") return get_registers(frame, "exception state")