[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
Wed Apr 1 05:26:17 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:

In doing some other research https://github.com/llvm/llvm-project/issues/189711 I found that the only way gdb and gdbserver gets memory information is reading `/proc/pid/maps` using `vFile` packets.

So I suspect they will switch to reading `/proc/pid/smaps` instead, which is a superset of `maps`. Which is what we do, we just have lldb-server do that and put the information into `qMemoryRegionInfo` responses.

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


More information about the lldb-commits mailing list