Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / bindings / interface / SBFrameDocstrings.i
blob05a876a685a912794e7a59983231f4e3779a0667
1 %feature("docstring",
2 "Represents one of the stack frames associated with a thread.
4 SBThread contains SBFrame(s). For example (from test/lldbutil.py), ::
6 def print_stacktrace(thread, string_buffer = False):
7 '''Prints a simple stack trace of this thread.'''
9 ...
11 for i in range(depth):
12 frame = thread.GetFrameAtIndex(i)
13 function = frame.GetFunction()
15 load_addr = addrs[i].GetLoadAddress(target)
16 if not function:
17 file_addr = addrs[i].GetFileAddress()
18 start_addr = frame.GetSymbol().GetStartAddress().GetFileAddress()
19 symbol_offset = file_addr - start_addr
20 print >> output, ' frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(
21 num=i, addr=load_addr, mod=mods[i], symbol=symbols[i], offset=symbol_offset)
22 else:
23 print >> output, ' frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(
24 num=i, addr=load_addr, mod=mods[i],
25 func='%s [inlined]' % funcs[i] if frame.IsInlined() else funcs[i],
26 file=files[i], line=lines[i],
27 args=get_args_as_string(frame, showFuncName=False) if not frame.IsInlined() else '()')
29 ...
31 And, ::
33 for frame in thread:
34 print frame
36 See also SBThread."
37 ) lldb::SBFrame;
39 %feature("docstring", "
40 Get the Canonical Frame Address for this stack frame.
41 This is the DWARF standard's definition of a CFA, a stack address
42 that remains constant throughout the lifetime of the function.
43 Returns an lldb::addr_t stack address, or LLDB_INVALID_ADDRESS if
44 the CFA cannot be determined."
45 ) lldb::SBFrame::GetCFA;
47 %feature("docstring", "
48 Gets the deepest block that contains the frame PC.
50 See also GetFrameBlock()."
51 ) lldb::SBFrame::GetBlock;
53 %feature("docstring", "
54 Get the appropriate function name for this frame. Inlined functions in
55 LLDB are represented by Blocks that have inlined function information, so
56 just looking at the SBFunction or SBSymbol for a frame isn't enough.
57 This function will return the appropriate function, symbol or inlined
58 function name for the frame.
60 This function returns:
61 - the name of the inlined function (if there is one)
62 - the name of the concrete function (if there is one)
63 - the name of the symbol (if there is one)
64 - NULL
66 See also IsInlined()."
67 ) lldb::SBFrame::GetFunctionName;
69 %feature("docstring", "
70 Returns the language of the frame's SBFunction, or if there.
71 is no SBFunction, guess the language from the mangled name.
73 ) lldb::SBFrame::GuessLanguage;
75 %feature("docstring", "
76 Return true if this frame represents an inlined function.
78 See also GetFunctionName()."
79 ) lldb::SBFrame::IsInlined;
81 %feature("docstring", "
82 Return true if this frame is artificial (e.g a frame synthesized to
83 capture a tail call). Local variables may not be available in an artificial
84 frame."
85 ) lldb::SBFrame::IsArtificial;
87 %feature("docstring", "
88 The version that doesn't supply a 'use_dynamic' value will use the
89 target's default."
90 ) lldb::SBFrame::EvaluateExpression;
92 %feature("docstring", "
93 Gets the lexical block that defines the stack frame. Another way to think
94 of this is it will return the block that contains all of the variables
95 for a stack frame. Inlined functions are represented as SBBlock objects
96 that have inlined function information: the name of the inlined function,
97 where it was called from. The block that is returned will be the first
98 block at or above the block for the PC (SBFrame::GetBlock()) that defines
99 the scope of the frame. When a function contains no inlined functions,
100 this will be the top most lexical block that defines the function.
101 When a function has inlined functions and the PC is currently
102 in one of those inlined functions, this method will return the inlined
103 block that defines this frame. If the PC isn't currently in an inlined
104 function, the lexical block that defines the function is returned."
105 ) lldb::SBFrame::GetFrameBlock;
107 %feature("docstring", "
108 The version that doesn't supply a 'use_dynamic' value will use the
109 target's default."
110 ) lldb::SBFrame::GetVariables;
112 %feature("docstring", "
113 The version that doesn't supply a 'use_dynamic' value will use the
114 target's default."
115 ) lldb::SBFrame::FindVariable;
117 %feature("docstring", "
118 Get a lldb.SBValue for a variable path.
120 Variable paths can include access to pointer or instance members: ::
122 rect_ptr->origin.y
123 pt.x
125 Pointer dereferences: ::
127 *this->foo_ptr
128 **argv
130 Address of: ::
133 &my_array[3].x
135 Array accesses and treating pointers as arrays: ::
137 int_array[1]
138 pt_ptr[22].x
140 Unlike `EvaluateExpression()` which returns :py:class:`SBValue` objects
141 with constant copies of the values at the time of evaluation,
142 the result of this function is a value that will continue to
143 track the current value of the value as execution progresses
144 in the current frame."
145 ) lldb::SBFrame::GetValueForVariablePath;
147 %feature("docstring", "
148 Find variables, register sets, registers, or persistent variables using
149 the frame as the scope.
151 The version that doesn't supply a ``use_dynamic`` value will use the
152 target's default."
153 ) lldb::SBFrame::FindValue;