[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
Tue Mar 24 08:07:18 PDT 2026
================
@@ -1443,6 +1443,8 @@ tuples to return are:
listed (`dirty-pages:;`) indicates no dirty pages in
this memory region. The *absence* of this key means
that this stub cannot determine dirty pages.
+* `protection-key:<key>` - where `<key>` is an unsigned integer memory
----------------
DavidSpickett wrote:
For this specific packet, this is LLDB exclusive. I do not think we can align with GDB in that sense. I believe it reads proc/pid/maps or smaps directly, rather than having the server parse it.
Well, we could also have a fallback for that, but it's a different approach and if I implement that it would be a generic change that would work for protection keys and everything else.
Overall, GDB has not done anything for protection keys beyond showing the Intel registers that hold the permission sets. No commands show them, they're not parsing keys from smaps yet. Our memory region commands are incompatible anyway, so we could get user experience ideas but there's nothing yet.
So I think we're safe to plow ahead with this implementation, and maybe we can add to it a GDB style fallback to get maps/smaps later.
I've asked Thiago what his plans are.
https://github.com/llvm/llvm-project/pull/182246
More information about the lldb-commits
mailing list