1010#define LLDB_TARGET_STACKID_H
1111
1212#include " lldb/Core/AddressRange.h"
13- #include " lldb/lldb-private.h"
1413
1514namespace lldb_private {
1615
1716class Process ;
1817
1918class StackID {
2019public:
21- // Constructors and Destructors
2220 StackID () = default ;
2321
2422 explicit StackID (lldb::addr_t pc, lldb::addr_t cfa,
2523 SymbolContextScope *symbol_scope, Process *process);
2624
27- StackID (const StackID &rhs) = default ;
28-
2925 ~StackID () = default ;
3026
3127 lldb::addr_t GetPC () const { return m_pc; }
3228
33- lldb::addr_t GetCallFrameAddress () const { return m_cfa; }
29+ lldb::addr_t GetCallFrameAddressWithMetadata () const {
30+ return m_cfa_with_metadata;
31+ }
32+
33+ lldb::addr_t GetCallFrameAddressWithoutMetadata () const { return m_cfa; }
3434
3535 SymbolContextScope *GetSymbolContextScope () const { return m_symbol_scope; }
3636
@@ -51,17 +51,6 @@ class StackID {
5151
5252 void Dump (Stream *s);
5353
54- // Operators
55- const StackID &operator =(const StackID &rhs) {
56- if (this != &rhs) {
57- m_pc = rhs.m_pc ;
58- m_cfa = rhs.m_cfa ;
59- m_cfa_on_stack = rhs.m_cfa_on_stack ;
60- m_symbol_scope = rhs.m_symbol_scope ;
61- }
62- return *this ;
63- }
64-
6554 // / Check if the CFA is on the stack, or elsewhere in the process, such as on
6655 // / the heap.
6756 bool IsCFAOnStack (Process &process) const ;
@@ -76,28 +65,31 @@ class StackID {
7665 void SetPC (lldb::addr_t pc, Process *process);
7766 void SetCFA (lldb::addr_t cfa, Process *process);
7867
79- lldb::addr_t m_pc =
80- LLDB_INVALID_ADDRESS; // The pc value for the function/symbol for this
81- // frame. This will
82- // only get used if the symbol scope is nullptr (the code where we are
83- // stopped is not represented by any function or symbol in any shared
84- // library).
85- lldb::addr_t m_cfa =
86- LLDB_INVALID_ADDRESS; // The call frame address (stack pointer) value
87- // at the beginning of the function that uniquely
88- // identifies this frame (along with m_symbol_scope
89- // below)
90- // True if the CFA is an address on the stack, false if it's an address
91- // elsewhere (ie heap).
68+ // / The pc value for the function/symbol for this frame. This will only get
69+ // / used if the symbol scope is nullptr (the code where we are stopped is not
70+ // / represented by any function or symbol in any shared library).
71+ lldb::addr_t m_pc = LLDB_INVALID_ADDRESS;
72+
73+ // / The call frame address (stack pointer) value at the beginning of the
74+ // / function that uniquely identifies this frame (along with m_symbol_scope
75+ // / below)
76+ lldb::addr_t m_cfa = LLDB_INVALID_ADDRESS;
77+
78+ // / The cfa with metadata (i.e. prior to Process::FixAddress).
79+ lldb::addr_t m_cfa_with_metadata = LLDB_INVALID_ADDRESS;
80+
81+ // / If nullptr, there is no block or symbol for this frame. If not nullptr,
82+ // / this will either be the scope for the lexical block for the frame, or the
83+ // / scope for the symbol. Symbol context scopes are always be unique pointers
84+ // / since the are part of the Block and Symbol objects and can easily be used
85+ // / to tell if a stack ID is the same as another.
86+ SymbolContextScope *m_symbol_scope = nullptr ;
87+
88+ // BEGIN SWIFT
89+ // / True if the CFA is an address on the stack, false if it's an address
90+ // / elsewhere (ie heap).
9291 mutable LazyBool m_cfa_on_stack = eLazyBoolCalculate;
93- SymbolContextScope *m_symbol_scope =
94- nullptr ; // If nullptr, there is no block or symbol for this frame.
95- // If not nullptr, this will either be the scope for the
96- // lexical block for the frame, or the scope for the
97- // symbol. Symbol context scopes are always be unique
98- // pointers since the are part of the Block and Symbol
99- // objects and can easily be used to tell if a stack ID
100- // is the same as another.
92+ // END SWIFT
10193};
10294
10395bool operator ==(const StackID &lhs, const StackID &rhs);
0 commit comments