[Lldb-commits] [lldb] [lldb][Linux] Add overlay and effective permissions to "memory region" (PR #184115)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 2 05:33:21 PST 2026
================
@@ -1694,6 +1694,29 @@ 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,
+ *protection_key);
+
+ if (const lldb::ABISP &abi = target.GetProcessSP()->GetABI()) {
+ uint32_t base_permissions = range_info.GetLLDBPermissions();
+ if (auto permissions =
----------------
DavidSpickett wrote:
X86 Linux also has memory protection keys, but because its ABI plugin doesn't override this method, it will just show `protection key: N`.
To make that work, someone would need to override that method, and add the x86 overlay register (but I have no intention to do so).
https://github.com/llvm/llvm-project/pull/184115
More information about the lldb-commits
mailing list