[Lldb-commits] [lldb] [lldb][docs] document an analogue for `info proc mappings` (PR #153559)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 14 01:57:50 PDT 2025
================
@@ -1126,6 +1126,20 @@ Save binary memory data starting at ``0x1000`` and ending at ``0x2000`` to a fil
(lldb) memory read --outfile /tmp/mem.bin --binary 0x1000 0x2000
(lldb) me r -o /tmp/mem.bin -b 0x1000 0x2000
+
+Print information about mapped memory regions
----------------
DavidSpickett wrote:
LLDB's memory region handling is inconsistent in that in some circumstances, you don't get a region if the address is not mapped, sometimes you do. It's weird and we'd probably fix it if it hadn't been that way for so long.
Anyway, `--all` is one of those situations where the unmapped gaps are shown:
```
(lldb) help memory region
Get information on the memory region containing an address in the current target process.
Syntax: memory region <address-expression> (or --all)
Command Options Usage:
memory region <address-expression>
memory region -a
-a ( --all )
Show all memory regions. This is equivalent to starting from address 0 and repeating the
command. Unmapped areas are included.
```
So if you make the title "Print information about memory regions", that will make it accurate.
`memory region --all` is the closest equivalent, there's no option to hide the unmapped gaps. If you do `memory region 0` then repeat the command, it *might* skip unmapped areas but I don't recall.
https://github.com/llvm/llvm-project/pull/153559
More information about the lldb-commits
mailing list