Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / bindings / interface / SBValueListDocstrings.i
blob7d7eb89659e4fd4d5d88f2975b1091b6ce053495
1 %feature("docstring",
2 "Represents a collection of SBValues. Both :py:class:`SBFrame.GetVariables()` and
3 :py:class:`SBFrame.GetRegisters()` return a SBValueList.
5 SBValueList supports :py:class:`SBValue` iteration. For example (from test/lldbutil.py),::
7 def get_registers(frame, kind):
8 '''Returns the registers given the frame and the kind of registers desired.
10 Returns None if there's no such kind.
11 '''
12 registerSet = frame.GetRegisters() # Return type of SBValueList.
13 for value in registerSet:
14 if kind.lower() in value.GetName().lower():
15 return value
17 return None
19 def get_GPRs(frame):
20 '''Returns the general purpose registers of the frame as an SBValue.
22 The returned SBValue object is iterable. An example:
23 ...
24 from lldbutil import get_GPRs
25 regs = get_GPRs(frame)
26 for reg in regs:
27 print('%s => %s' % (reg.GetName(), reg.GetValue()))
28 ...
29 '''
30 return get_registers(frame, 'general purpose')
32 def get_FPRs(frame):
33 '''Returns the floating point registers of the frame as an SBValue.
35 The returned SBValue object is iterable. An example:
36 ...
37 from lldbutil import get_FPRs
38 regs = get_FPRs(frame)
39 for reg in regs:
40 print('%s => %s' % (reg.GetName(), reg.GetValue()))
41 ...
42 '''
43 return get_registers(frame, 'floating point')
45 def get_ESRs(frame):
46 '''Returns the exception state registers of the frame as an SBValue.
48 The returned SBValue object is iterable. An example:
49 ...
50 from lldbutil import get_ESRs
51 regs = get_ESRs(frame)
52 for reg in regs:
53 print('%s => %s' % (reg.GetName(), reg.GetValue()))
54 ...
55 '''
56 return get_registers(frame, 'exception state')
58 ) lldb::SBValueList;