[Lldb-commits] [PATCH] D111791: [lldb] Add --all option to "memory region"

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 14 04:50:16 PDT 2021


DavidSpickett created this revision.
Herald added a subscriber: dang.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

This adds an option to the memory region command
to print all regions at once. Like you can do by
starting at address 0 and repeating the command
manually.

memory region [-a] [<address-expression>]

(lldb) memory region --all
[0x0000000000000000-0x0000000000400000) ---
[0x0000000000400000-0x0000000000401000) r-x <...>/a.out PT_LOAD[0]
<...>
[0x0000fffffffdf000-0x0001000000000000) rw- [stack]
[0x0001000000000000-0xffffffffffffffff) ---

The output matches exactly what you'd get from
repeating the command. Including that it shows
unmapped areas between the mapped regions.

(this is why Process GetMemoryRegions is not
used, that skips unmapped areas)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111791

Files:
  lldb/source/Commands/CommandObjectMemory.cpp
  lldb/source/Commands/Options.td
  lldb/test/API/functionalities/memory-region/TestMemoryRegion.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111791.379666.patch
Type: text/x-patch
Size: 12215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211014/149f5d8f/attachment.bin>


More information about the lldb-commits mailing list