[Lldb-commits] [PATCH] D87442: [lldb] Show flags for memory regions
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 10 02:20:33 PDT 2020
DavidSpickett created this revision.
Herald added subscribers: lldb-commits, mgorny.
Herald added a project: LLDB.
DavidSpickett requested review of this revision.
Herald added a subscriber: JDevlieghere.
This extends the "memory region" command to
show flags such as those found in /proc/smaps
on Linux.
(lldb) memory region addr
[0x00007ffff7ed3000-0x00007ffff7fd3000) rw- /dev/zero (deleted)
flags: me mr ms mw rd sd sh wr
- Added an optional "flags" field to the qMemoryRegion packet
- "memory region" command will show flags where possible
- HasFlags and GetFlags added to Python API for memory regions
- Added testing for Linux proc maps parsing
Flags are represented as strings, space seperated when
together. This is done to account for differences
between OS naming. (versus inventing some generic
set of names)
For now we'll just show the information to the user.
Future HasSomeFlag() methods can check for spellings
based on platform.
Only Linux /proc/smaps parsing is supported in this initial
change. Targets that don't have or currently support this
information can leave out the field and it won't be shown
in the command output.
(API users can check HasFlags() for this)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87442
Files:
lldb/bindings/interface/SBMemoryRegionInfo.i
lldb/docs/lldb-gdb-remote.txt
lldb/include/lldb/API/SBMemoryRegionInfo.h
lldb/include/lldb/Target/MemoryRegionInfo.h
lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
lldb/source/API/SBMemoryRegionInfo.cpp
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/source/Plugins/Process/Utility/LinuxProcMaps.cpp
lldb/source/Plugins/Process/Utility/LinuxProcMaps.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/source/Target/MemoryRegionInfo.cpp
lldb/unittests/Process/CMakeLists.txt
lldb/unittests/Process/Utility/CMakeLists.txt
lldb/unittests/Process/Utility/LinuxProcMapsTest.cpp
lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
lldb/unittests/Process/minidump/MinidumpParserTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87442.290910.patch
Type: text/x-patch
Size: 40378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200910/b4b6c876/attachment-0001.bin>
More information about the lldb-commits
mailing list