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.'''
11 for i in range(depth):
12 frame = thread.GetFrameAtIndex(i)
13 function = frame.GetFunction()
15 load_addr = addrs[i].GetLoadAddress(target)
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)
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 '()')
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)
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
85 ) lldb
::SBFrame
::IsArtificial
;
87 %feature
("docstring", "
88 The version that doesn't supply a 'use_dynamic' value will use the
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
110 ) lldb
::SBFrame
::GetVariables
;
112 %feature
("docstring", "
113 The version that doesn't supply a 'use_dynamic' value will use the
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: ::
125 Pointer dereferences: ::
135 Array accesses and treating pointers as arrays: ::
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
153 ) lldb
::SBFrame
::FindValue
;