LLDB mainline
StackFrame.h
Go to the documentation of this file.
1
2//===-- StackFrame.h --------------------------------------------*- C++ -*-===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLDB_TARGET_STACKFRAME_H
11#define LLDB_TARGET_STACKFRAME_H
12
13#include <memory>
14#include <mutex>
15
16#include "lldb/Utility/Flags.h"
17
22#include "lldb/Target/StackID.h"
23#include "lldb/Utility/Scalar.h"
24#include "lldb/Utility/Status.h"
26#include "lldb/Utility/UserID.h"
27
28namespace lldb_private {
29
30/// \class StackFrame StackFrame.h "lldb/Target/StackFrame.h"
31///
32/// This base class provides an interface to stack frames.
33///
34/// StackFrames may have a Canonical Frame Address (CFA) or not.
35/// A frame may have a plain pc value or it may indicate a specific point in
36/// the debug session so the correct section load list is used for
37/// symbolication.
38///
39/// Local variables may be available, or not. A register context may be
40/// available, or not.
41
43 public std::enable_shared_from_this<StackFrame> {
44public:
52 };
53
54 enum class Kind {
55 /// A regular stack frame with access to registers and local variables.
56 Regular,
57
58 /// A historical stack frame -- possibly without CFA or registers or
59 /// local variables.
60 History,
61
62 /// An artificial stack frame (e.g. a synthesized result of inferring
63 /// missing tail call frames from a backtrace) with limited support for
64 /// local variables.
66 };
67
68 /// Construct a StackFrame object without supplying a RegisterContextSP.
69 ///
70 /// This is the one constructor that doesn't take a RegisterContext
71 /// parameter. This ctor may be called when creating a history StackFrame;
72 /// these are used if we've collected a stack trace of pc addresses at some
73 /// point in the past. We may only have pc values. We may have a CFA,
74 /// or more likely, we won't.
75 ///
76 /// \param [in] thread_sp
77 /// The Thread that this frame belongs to.
78 ///
79 /// \param [in] frame_idx
80 /// This StackFrame's frame index number in the Thread. If inlined stack
81 /// frames are being created, this may differ from the concrete_frame_idx
82 /// which is the frame index without any inlined stack frames.
83 ///
84 /// \param [in] concrete_frame_idx
85 /// The StackFrame's frame index number in the Thread without any inlined
86 /// stack frames being included in the index.
87 ///
88 /// \param [in] cfa
89 /// The Canonical Frame Address (this terminology from DWARF) for this
90 /// stack frame. The CFA for a stack frame does not change over the
91 /// span of the stack frame's existence. It is often the value of the
92 /// caller's stack pointer before the call instruction into this frame's
93 /// function. It is usually not the same as the frame pointer register's
94 /// value.
95 ///
96 /// \param [in] cfa_is_valid
97 /// A history stack frame may not have a CFA value collected. We want to
98 /// distinguish between "no CFA available" and a CFA of
99 /// LLDB_INVALID_ADDRESS.
100 ///
101 /// \param [in] pc
102 /// The current pc value of this stack frame.
103 ///
104 /// \param [in] sc_ptr
105 /// Optionally seed the StackFrame with the SymbolContext information that
106 /// has
107 /// already been discovered.
108 StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx,
109 lldb::user_id_t concrete_frame_idx, lldb::addr_t cfa,
110 bool cfa_is_valid, lldb::addr_t pc, Kind frame_kind,
111 bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr);
112
113 StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx,
114 lldb::user_id_t concrete_frame_idx,
115 const lldb::RegisterContextSP &reg_context_sp, lldb::addr_t cfa,
116 lldb::addr_t pc, bool behaves_like_zeroth_frame,
117 const SymbolContext *sc_ptr);
118
119 StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx,
120 lldb::user_id_t concrete_frame_idx,
121 const lldb::RegisterContextSP &reg_context_sp, lldb::addr_t cfa,
122 const Address &pc, bool behaves_like_zeroth_frame,
123 const SymbolContext *sc_ptr);
124
125 ~StackFrame() override;
126
127 lldb::ThreadSP GetThread() const { return m_thread_wp.lock(); }
128
130
131 /// Get an Address for the current pc value in this StackFrame.
132 ///
133 /// May not be the same as the actual PC value for inlined stack frames.
134 ///
135 /// \return
136 /// The Address object set to the current PC value.
138
139 /// Get the current code Address suitable for symbolication,
140 /// may not be the same as GetFrameCodeAddress().
141 ///
142 /// For a frame in the middle of the stack, the return-pc is the
143 /// current code address, but for symbolication purposes the
144 /// return address after a noreturn call may point to the next
145 /// function, a DWARF location list entry that is a completely
146 /// different code path, or the wrong source line.
147 ///
148 /// The address returned should be used for symbolication (source line,
149 /// block, function, DWARF location entry selection) but should NOT
150 /// be shown to the user. It may not point to an actual instruction
151 /// boundary.
152 ///
153 /// \return
154 /// The Address object set to the current PC value.
156
157 /// Change the pc value for a given thread.
158 ///
159 /// Change the current pc value for the frame on this thread.
160 ///
161 /// \param[in] pc
162 /// The load address that the pc will be set to.
163 ///
164 /// \return
165 /// true if the pc was changed. false if this failed -- possibly
166 /// because this frame is not a live StackFrame.
168
169 /// Provide a SymbolContext for this StackFrame's current pc value.
170 ///
171 /// The StackFrame maintains this SymbolContext and adds additional
172 /// information to it on an as-needed basis. This helps to avoid different
173 /// functions looking up symbolic information for a given pc value multiple
174 /// times.
175 ///
176 /// \param [in] resolve_scope
177 /// Flags from the SymbolContextItem enumerated type which specify what
178 /// type of symbol context is needed by this caller.
179 ///
180 /// \return
181 /// A SymbolContext reference which includes the types of information
182 /// requested by resolve_scope, if they are available.
183 const SymbolContext &GetSymbolContext(lldb::SymbolContextItem resolve_scope);
184
185 /// Return the Canonical Frame Address (DWARF term) for this frame.
186 ///
187 /// The CFA is typically the value of the stack pointer register before the
188 /// call invocation is made. It will not change during the lifetime of a
189 /// stack frame. It is often not the same thing as the frame pointer
190 /// register value.
191 ///
192 /// Live StackFrames will always have a CFA but other types of frames may
193 /// not be able to supply one.
194 ///
195 /// \param [out] value
196 /// The address of the CFA for this frame, if available.
197 ///
198 /// \param [out] error_ptr
199 /// If there is an error determining the CFA address, this may contain a
200 /// string explaining the failure.
201 ///
202 /// \return
203 /// Returns true if the CFA value was successfully set in value. Some
204 /// frames may be unable to provide this value; they will return false.
205 bool GetFrameBaseValue(Scalar &value, Status *error_ptr);
206
207 /// Get the DWARFExpressionList corresponding to the Canonical Frame Address.
208 ///
209 /// Often a register (bp), but sometimes a register + offset.
210 ///
211 /// \param [out] error_ptr
212 /// If there is an error determining the CFA address, this may contain a
213 /// string explaining the failure.
214 ///
215 /// \return
216 /// Returns the corresponding DWARF expression, or NULL.
218
219 /// Get the current lexical scope block for this StackFrame, if possible.
220 ///
221 /// If debug information is available for this stack frame, return a pointer
222 /// to the innermost lexical Block that the frame is currently executing.
223 ///
224 /// \return
225 /// A pointer to the current Block. nullptr is returned if this can
226 /// not be provided.
228
229 /// Get the RegisterContext for this frame, if possible.
230 ///
231 /// Returns a shared pointer to the RegisterContext for this stack frame.
232 /// Only a live StackFrame object will be able to return a RegisterContext -
233 /// callers must be prepared for an empty shared pointer being returned.
234 ///
235 /// Even a live StackFrame RegisterContext may not be able to provide all
236 /// registers. Only the currently executing frame (frame 0) can reliably
237 /// provide every register in the register context.
238 ///
239 /// \return
240 /// The RegisterContext shared point for this frame.
242
244 return m_reg_context_sp;
245 }
246
247 /// Retrieve the list of variables that are in scope at this StackFrame's
248 /// pc.
249 ///
250 /// A frame that is not live may return an empty VariableList for a given
251 /// pc value even though variables would be available at this point if it
252 /// were a live stack frame.
253 ///
254 /// \param[in] get_file_globals
255 /// Whether to also retrieve compilation-unit scoped variables
256 /// that are visible to the entire compilation unit (e.g. file
257 /// static in C, globals that are homed in this CU).
258 ///
259 /// \param [out] error_ptr
260 /// If there is an error in the debug information that prevents variables
261 /// from being fetched. \see SymbolFile::GetFrameVariableError() for full
262 /// details.
263 ///
264 /// \return
265 /// A pointer to a list of variables.
266 VariableList *GetVariableList(bool get_file_globals, Status *error_ptr);
267
268 /// Retrieve the list of variables that are in scope at this StackFrame's
269 /// pc.
270 ///
271 /// A frame that is not live may return an empty VariableListSP for a
272 /// given pc value even though variables would be available at this point if
273 /// it were a live stack frame.
274 ///
275 /// \param[in] get_file_globals
276 /// Whether to also retrieve compilation-unit scoped variables
277 /// that are visible to the entire compilation unit (e.g. file
278 /// static in C, globals that are homed in this CU).
279 ///
280 /// \return
281 /// A pointer to a list of variables.
283 GetInScopeVariableList(bool get_file_globals,
284 bool must_have_valid_location = false);
285
286 /// Create a ValueObject for a variable name / pathname, possibly including
287 /// simple dereference/child selection syntax.
288 ///
289 /// \param[in] var_expr
290 /// The string specifying a variable to base the VariableObject off
291 /// of.
292 ///
293 /// \param[in] use_dynamic
294 /// Whether the correct dynamic type of an object pointer should be
295 /// determined before creating the object, or if the static type is
296 /// sufficient. One of the DynamicValueType enumerated values.
297 ///
298 /// \param[in] options
299 /// An unsigned integer of flags, values from
300 /// StackFrame::ExpressionPathOption
301 /// enum.
302 /// \param[in] var_sp
303 /// A VariableSP that will be set to the variable described in the
304 /// var_expr path.
305 ///
306 /// \param[in] error
307 /// Record any errors encountered while evaluating var_expr.
308 ///
309 /// \return
310 /// A shared pointer to the ValueObject described by var_expr.
312 llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic,
313 uint32_t options, lldb::VariableSP &var_sp, Status &error);
314
315 /// Determine whether this StackFrame has debug information available or not.
316 ///
317 /// \return
318 /// true if debug information is available for this frame (function,
319 /// compilation unit, block, etc.)
320 bool HasDebugInformation();
321
322 /// Return the disassembly for the instructions of this StackFrame's
323 /// function as a single C string.
324 ///
325 /// \return
326 /// C string with the assembly instructions for this function.
327 const char *Disassemble();
328
329 /// Print a description of this frame using the provided frame format.
330 ///
331 /// \param[out] strm
332 /// The Stream to print the description to.
333 ///
334 /// \param[in] frame_marker
335 /// Optional string that will be prepended to the frame output description.
336 ///
337 /// \return
338 /// \b true if and only if dumping with the given \p format worked.
339 bool DumpUsingFormat(Stream &strm,
341 llvm::StringRef frame_marker = {});
342
343 /// Print a description for this frame using the frame-format formatter
344 /// settings. If the current frame-format settings are invalid, then the
345 /// default formatter will be used (see \a StackFrame::Dump()).
346 ///
347 /// \param [in] strm
348 /// The Stream to print the description to.
349 ///
350 /// \param [in] show_unique
351 /// Whether to print the function arguments or not for backtrace unique.
352 ///
353 /// \param [in] frame_marker
354 /// Optional string that will be prepended to the frame output description.
355 void DumpUsingSettingsFormat(Stream *strm, bool show_unique = false,
356 const char *frame_marker = nullptr);
357
358 /// Print a description for this frame using a default format.
359 ///
360 /// \param [in] strm
361 /// The Stream to print the description to.
362 ///
363 /// \param [in] show_frame_index
364 /// Whether to print the frame number or not.
365 ///
366 /// \param [in] show_fullpaths
367 /// Whether to print the full source paths or just the file base name.
368 void Dump(Stream *strm, bool show_frame_index, bool show_fullpaths);
369
370 /// Print a description of this stack frame and/or the source
371 /// context/assembly for this stack frame.
372 ///
373 /// \param[in] strm
374 /// The Stream to send the output to.
375 ///
376 /// \param[in] show_frame_info
377 /// If true, print the frame info by calling DumpUsingSettingsFormat().
378 ///
379 /// \param[in] show_source
380 /// If true, print source or disassembly as per the user's settings.
381 ///
382 /// \param[in] show_unique
383 /// If true, print using backtrace unique style, without function
384 /// arguments as per the user's settings.
385 ///
386 /// \param[in] frame_marker
387 /// Passed to DumpUsingSettingsFormat() for the frame info printing.
388 ///
389 /// \return
390 /// Returns true if successful.
391 bool GetStatus(Stream &strm, bool show_frame_info, bool show_source,
392 bool show_unique = false, const char *frame_marker = nullptr);
393
394 /// Query whether this frame is a concrete frame on the call stack, or if it
395 /// is an inlined frame derived from the debug information and presented by
396 /// the debugger.
397 ///
398 /// \return
399 /// true if this is an inlined frame.
400 bool IsInlined();
401
402 /// Query whether this frame is part of a historical backtrace.
403 bool IsHistorical() const;
404
405 /// Query whether this frame is artificial (e.g a synthesized result of
406 /// inferring missing tail call frames from a backtrace). Artificial frames
407 /// may have limited support for inspecting variables.
408 bool IsArtificial() const;
409
410 /// Query whether this frame should be hidden from backtraces. Frame
411 /// recognizers can customize this behavior and hide distracting
412 /// system implementation details this way.
413 bool IsHidden();
414
415 /// Query this frame to find what frame it is in this Thread's
416 /// StackFrameList.
417 ///
418 /// \return
419 /// StackFrame index 0 indicates the currently-executing function. Inline
420 /// frames are included in this frame index count.
421 uint32_t GetFrameIndex() const;
422
423 /// Set this frame's synthetic frame index.
424 void SetFrameIndex(uint32_t index) { m_frame_index = index; }
425
426 /// Query this frame to find what frame it is in this Thread's
427 /// StackFrameList, not counting inlined frames.
428 ///
429 /// \return
430 /// StackFrame index 0 indicates the currently-executing function. Inline
431 /// frames are not included in this frame index count; their concrete
432 /// frame index will be the same as the concrete frame that they are
433 /// derived from.
435
436 /// Create a ValueObject for a given Variable in this StackFrame.
437 ///
438 /// \param [in] variable_sp
439 /// The Variable to base this ValueObject on
440 ///
441 /// \param [in] use_dynamic
442 /// Whether the correct dynamic type of the variable should be
443 /// determined before creating the ValueObject, or if the static type
444 /// is sufficient. One of the DynamicValueType enumerated values.
445 ///
446 /// \return
447 /// A ValueObject for this variable.
450 lldb::DynamicValueType use_dynamic);
451
452 /// Query this frame to determine what the default language should be when
453 /// parsing expressions given the execution context.
454 ///
455 /// \return The language of the frame if known.
457
458 /// Similar to GetLanguage(), but is allowed to take a potentially incorrect
459 /// guess if exact information is not available.
461
462 /// Attempt to econstruct the ValueObject for a given raw address touched by
463 /// the current instruction. The ExpressionPath should indicate how to get
464 /// to this value using "frame variable."
465 ///
466 /// \param [in] addr
467 /// The raw address.
468 ///
469 /// \return
470 /// The ValueObject if found. If valid, it has a valid ExpressionPath.
472
473 /// Attempt to reconstruct the ValueObject for the address contained in a
474 /// given register plus an offset. The ExpressionPath should indicate how
475 /// to get to this value using "frame variable."
476 ///
477 /// \param [in] reg
478 /// The name of the register.
479 ///
480 /// \param [in] offset
481 /// The offset from the register. Particularly important for sp...
482 ///
483 /// \return
484 /// The ValueObject if found. If valid, it has a valid ExpressionPath.
486 int64_t offset);
487
488 /// Attempt to reconstruct the ValueObject for a variable with a given \a name
489 /// from within the current StackFrame, within the current block. The search
490 /// for the variable starts in the deepest block corresponding to the current
491 /// PC in the stack frame and traverse through all parent blocks stopping at
492 /// inlined function boundaries.
493 ///
494 /// \param [in] name
495 /// The name of the variable.
496 ///
497 /// \return
498 /// The ValueObject if found.
500
501 // lldb::ExecutionContextScope pure virtual functions
503
505
507
509
510 void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
511
513
514protected:
515 friend class StackFrameList;
516
517 void SetSymbolContextScope(SymbolContextScope *symbol_scope);
518
520
522
523 bool HasCachedData() const;
524
525private:
526 /// For StackFrame only.
527 /// \{
533 /// \}
534
535 /// The frame code address (might not be the same as the actual PC
536 /// for inlined frames) as a section/offset address.
543 /// Does this frame have a CFA? Different from CFA == LLDB_INVALID_ADDRESS.
546
547 /// Whether this frame behaves like the zeroth frame, in the sense
548 /// that its pc value might not immediately follow a call (and thus might
549 /// be the first address of its function). True for actual frame zero as
550 /// well as any other frame with the same trait.
553 /// Value objects for each variable in m_variable_list_sp.
555 std::optional<lldb::RecognizedStackFrameSP> m_recognized_frame_sp;
557 std::recursive_mutex m_mutex;
558
559 StackFrame(const StackFrame &) = delete;
560 const StackFrame &operator=(const StackFrame &) = delete;
561};
562
563} // namespace lldb_private
564
565#endif // LLDB_TARGET_STACKFRAME_H
static llvm::raw_ostream & error(Stream &strm)
A section + offset based address class.
Definition: Address.h:62
A class that describes a single lexical block.
Definition: Block.h:41
A uniqued constant string class.
Definition: ConstString.h:40
"lldb/Expression/DWARFExpressionList.h" Encapsulates a range map from file address range to a single ...
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class to manage flags.
Definition: Flags.h:22
This base class provides an interface to stack frames.
Definition: StackFrame.h:43
void SetSymbolContextScope(SymbolContextScope *symbol_scope)
Definition: StackFrame.cpp:184
uint16_t m_frame_recognizer_generation
Definition: StackFrame.h:542
lldb::VariableListSP m_variable_list_sp
Definition: StackFrame.h:552
void UpdatePreviousFrameFromCurrentFrame(StackFrame &curr_frame)
lldb::ThreadSP GetThread() const
Definition: StackFrame.h:127
uint32_t GetConcreteFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList, not counting inlined frame...
Definition: StackFrame.h:434
Address m_frame_code_addr
The frame code address (might not be the same as the actual PC for inlined frames) as a section/offse...
Definition: StackFrame.h:537
@ eExpressionPathOptionsInspectAnonymousUnions
Definition: StackFrame.h:51
@ eExpressionPathOptionsAllowDirectIVarAccess
Definition: StackFrame.h:50
@ eExpressionPathOptionsNoSyntheticArrayRange
Definition: StackFrame.h:49
@ eExpressionPathOptionsNoSyntheticChildren
Definition: StackFrame.h:48
bool IsHidden()
Query whether this frame should be hidden from backtraces.
VariableList * GetVariableList(bool get_file_globals, Status *error_ptr)
Retrieve the list of variables that are in scope at this StackFrame's pc.
Definition: StackFrame.cpp:424
DWARFExpressionList * GetFrameBaseExpression(Status *error_ptr)
Get the DWARFExpressionList corresponding to the Canonical Frame Address.
void SetFrameIndex(uint32_t index)
Set this frame's synthetic frame index.
Definition: StackFrame.h:424
void UpdateCurrentFrameFromPreviousFrame(StackFrame &prev_frame)
const StackFrame & operator=(const StackFrame &)=delete
ValueObjectList m_variable_list_value_objects
Value objects for each variable in m_variable_list_sp.
Definition: StackFrame.h:554
bool m_cfa_is_valid
Does this frame have a CFA? Different from CFA == LLDB_INVALID_ADDRESS.
Definition: StackFrame.h:544
lldb::ThreadWP m_thread_wp
For StackFrame only.
Definition: StackFrame.h:528
std::optional< lldb::RecognizedStackFrameSP > m_recognized_frame_sp
Definition: StackFrame.h:555
void DumpUsingSettingsFormat(Stream *strm, bool show_unique=false, const char *frame_marker=nullptr)
Print a description for this frame using the frame-format formatter settings.
bool IsInlined()
Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived ...
lldb::ValueObjectSP GetValueForVariableExpressionPath(llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic, uint32_t options, lldb::VariableSP &var_sp, Status &error)
Create a ValueObject for a variable name / pathname, possibly including simple dereference/child sele...
Definition: StackFrame.cpp:508
SourceLanguage GuessLanguage()
Similar to GetLanguage(), but is allowed to take a potentially incorrect guess if exact information i...
lldb::RegisterContextSP GetRegisterContext()
Get the RegisterContext for this frame, if possible.
lldb::RegisterContextSP m_reg_context_sp
Definition: StackFrame.h:531
lldb::ValueObjectSP GuessValueForRegisterAndOffset(ConstString reg, int64_t offset)
Attempt to reconstruct the ValueObject for the address contained in a given register plus an offset.
StackFrame(const StackFrame &)=delete
lldb::VariableListSP GetInScopeVariableList(bool get_file_globals, bool must_have_valid_location=false)
Retrieve the list of variables that are in scope at this StackFrame's pc.
Definition: StackFrame.cpp:475
Address GetFrameCodeAddressForSymbolication()
Get the current code Address suitable for symbolication, may not be the same as GetFrameCodeAddress()...
Definition: StackFrame.cpp:222
@ History
A historical stack frame – possibly without CFA or registers or local variables.
@ Artificial
An artificial stack frame (e.g.
@ Regular
A regular stack frame with access to registers and local variables.
uint32_t m_concrete_frame_index
Definition: StackFrame.h:530
bool m_behaves_like_zeroth_frame
Whether this frame behaves like the zeroth frame, in the sense that its pc value might not immediatel...
Definition: StackFrame.h:551
lldb::ValueObjectSP GuessValueForAddress(lldb::addr_t addr)
Attempt to econstruct the ValueObject for a given raw address touched by the current instruction.
bool ChangePC(lldb::addr_t pc)
Change the pc value for a given thread.
Definition: StackFrame.cpp:247
lldb::ThreadSP CalculateThread() override
SourceLanguage GetLanguage()
Query this frame to determine what the default language should be when parsing expressions given the ...
lldb::ValueObjectSP GetValueObjectForFrameVariable(const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic)
Create a ValueObject for a given Variable in this StackFrame.
StreamString m_disassembly
Definition: StackFrame.h:556
lldb::StackFrameSP CalculateStackFrame() override
const SymbolContext & GetSymbolContext(lldb::SymbolContextItem resolve_scope)
Provide a SymbolContext for this StackFrame's current pc value.
Definition: StackFrame.cpp:300
bool IsHistorical() const
Query whether this frame is part of a historical backtrace.
const char * Disassemble()
Return the disassembly for the instructions of this StackFrame's function as a single C string.
Definition: StackFrame.cpp:261
bool IsArtificial() const
Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frame...
void CalculateExecutionContext(ExecutionContext &exe_ctx) override
Reconstruct the object's execution context into sc.
void Dump(Stream *strm, bool show_frame_index, bool show_fullpaths)
Print a description for this frame using a default format.
uint32_t GetFrameIndex() const
Query this frame to find what frame it is in this Thread's StackFrameList.
Definition: StackFrame.cpp:175
bool HasDebugInformation()
Determine whether this StackFrame has debug information available or not.
bool GetStatus(Stream &strm, bool show_frame_info, bool show_source, bool show_unique=false, const char *frame_marker=nullptr)
Print a description of this stack frame and/or the source context/assembly for this stack frame.
Block * GetFrameBlock()
Get the current lexical scope block for this StackFrame, if possible.
Definition: StackFrame.cpp:275
bool GetFrameBaseValue(Scalar &value, Status *error_ptr)
Return the Canonical Frame Address (DWARF term) for this frame.
bool DumpUsingFormat(Stream &strm, const lldb_private::FormatEntity::Entry *format, llvm::StringRef frame_marker={})
Print a description of this frame using the provided frame format.
lldb::ProcessSP CalculateProcess() override
const lldb::RegisterContextSP & GetRegisterContextSP() const
Definition: StackFrame.h:243
lldb::RecognizedStackFrameSP GetRecognizedFrame()
std::recursive_mutex m_mutex
Definition: StackFrame.h:557
lldb::ValueObjectSP FindVariable(ConstString name)
Attempt to reconstruct the ValueObject for a variable with a given name from within the current Stack...
const Address & GetFrameCodeAddress()
Get an Address for the current pc value in this StackFrame.
Definition: StackFrame.cpp:190
lldb::TargetSP CalculateTarget() override
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:34
A collection of ValueObject values that.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
Definition: lldb-forward.h:420
std::shared_ptr< lldb_private::RecognizedStackFrame > RecognizedStackFrameSP
Definition: lldb-forward.h:401
std::shared_ptr< lldb_private::Thread > ThreadSP
Definition: lldb-forward.h:446
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:480
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:387
std::shared_ptr< lldb_private::VariableList > VariableListSP
Definition: lldb-forward.h:483
std::shared_ptr< lldb_private::Variable > VariableSP
Definition: lldb-forward.h:482
uint64_t user_id_t
Definition: lldb-types.h:82
uint64_t addr_t
Definition: lldb-types.h:80
std::shared_ptr< lldb_private::Target > TargetSP
Definition: lldb-forward.h:444
std::weak_ptr< lldb_private::Thread > ThreadWP
Definition: lldb-forward.h:447
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
Definition: lldb-forward.h:392
A type-erased pair of llvm::dwarf::SourceLanguageName and version.