[Lldb-commits] [lldb] 3ed6311 - [lldb] Make sure the value of `eSymbolContextVariable` is not conflicting with `RESOLVED_FRAME_CODE_ADDR`

Argyrios Kyrtzidis via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 5 13:54:29 PST 2022


Author: Argyrios Kyrtzidis
Date: 2022-12-05T13:43:36-08:00
New Revision: 3ed6311b1b7dfec44eb96327a1a4f5b712cc3884

URL: https://github.com/llvm/llvm-project/commit/3ed6311b1b7dfec44eb96327a1a4f5b712cc3884
DIFF: https://github.com/llvm/llvm-project/commit/3ed6311b1b7dfec44eb96327a1a4f5b712cc3884.diff

LOG: [lldb] Make sure the value of `eSymbolContextVariable` is not conflicting with `RESOLVED_FRAME_CODE_ADDR`

Differential Revision: https://reviews.llvm.org/D139066

Added: 
    

Modified: 
    lldb/include/lldb/lldb-enumerations.h
    lldb/source/Target/StackFrame.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h
index c46ef4bf36161..f4748d0030f56 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -375,6 +375,9 @@ FLAGS_ENUM(SymbolContextItem){
     /// from being used during frame PC lookups and many other
     /// potential address to symbol context lookups.
     eSymbolContextVariable = (1u << 7),
+
+    // Keep this last and up-to-date for what the last enum value is.
+    eSymbolContextLastItem = eSymbolContextVariable,
 };
 LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem)
 

diff  --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index b600ffe9520d4..c04b58e80523b 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -44,7 +44,7 @@ using namespace lldb_private;
 // The first bits in the flags are reserved for the SymbolContext::Scope bits
 // so we know if we have tried to look up information in our internal symbol
 // context (m_sc) already.
-#define RESOLVED_FRAME_CODE_ADDR (uint32_t(eSymbolContextEverything + 1))
+#define RESOLVED_FRAME_CODE_ADDR (uint32_t(eSymbolContextLastItem) << 1)
 #define RESOLVED_FRAME_ID_SYMBOL_SCOPE (RESOLVED_FRAME_CODE_ADDR << 1)
 #define GOT_FRAME_BASE (RESOLVED_FRAME_ID_SYMBOL_SCOPE << 1)
 #define RESOLVED_VARIABLES (GOT_FRAME_BASE << 1)


        


More information about the lldb-commits mailing list