[Lldb-commits] [lldb] [lldb][Linux] Mark memory regions used for shadow stacks (PR #117861)

Omair Javaid via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 8 11:18:26 PST 2025


================
@@ -2796,11 +2796,17 @@ GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo(
     // Flags
     MemoryRegionInfo::OptionalBool memory_tagged =
         region_info.GetMemoryTagged();
-    if (memory_tagged != MemoryRegionInfo::eDontKnow) {
+    MemoryRegionInfo::OptionalBool is_shadow_stack =
+        region_info.IsShadowStack();
+
+    if (memory_tagged != MemoryRegionInfo::eDontKnow ||
+        is_shadow_stack != MemoryRegionInfo::eDontKnow) {
       response.PutCString("flags:");
-      if (memory_tagged == MemoryRegionInfo::eYes) {
+      if (memory_tagged == MemoryRegionInfo::eYes)
         response.PutCString("mt");
-      }
+      if (is_shadow_stack == MemoryRegionInfo::eYes)
----------------
omjavaid wrote:

Shouldnt there be a delimiter character between mt and ss?

https://github.com/llvm/llvm-project/pull/117861


More information about the lldb-commits mailing list