[Lldb-commits] [lldb] [lldb][Linux] Read memory protection keys for memory regions (PR #182246)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 26 06:58:30 PST 2026


================
@@ -1694,6 +1694,9 @@ class CommandObjectMemoryRegion : public CommandObjectParsed {
     MemoryRegionInfo::OptionalBool is_shadow_stack = range_info.IsShadowStack();
     if (is_shadow_stack == MemoryRegionInfo::OptionalBool::eYes)
       result.AppendMessage("shadow stack: yes");
+    if (std::optional<unsigned> protection_key = range_info.GetProtectionKey())
+      result.AppendMessageWithFormat("protection key: %" PRIu32 "\n",
----------------
DavidSpickett wrote:

And I've added a test case for `memory region --all` that checks we get the protection key, and only the protection key, on its own line.

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


More information about the lldb-commits mailing list