[lldb-dev] how to get all memory maps of debugged process?
gclayton at apple.com
Mon Feb 3 11:46:41 PST 2014
The lldb_private::Process has:
GetMemoryRegionInfo (lldb::addr_t load_addr,
error.SetErrorString ("Process::GetMemoryRegionInfo() not supported");
If this isn't implemented on linux, it would be great to be able to fill it in. The theory being you can start with address zero and use each result in MemoryRegionInfo to figure out what to ask for next. The info returned in MemoryRegionInfo is:
So querying at address zero would return a range of 0 - <first valid address> with read/write/execute set to false. Then you can query with "first valid address" to get the next range, etc. This of course would need to be exposed though the public API in SBProcess.
So there isn't anything exposed through the public API now, but it wouldn't be hard to do so with something like:
Then we would probably want to figure out if we can cache the map results in ProcessLinux based on the mod time of the /proc/<debugged-id>/map file (if that is possible).
On Feb 1, 2014, at 12:45 AM, Jun Koi <junkoi2004 at gmail.com> wrote:
> does LLDB provide any facilities to retrieve all the memory maps of debugged process from Python script?
> on Linux, we can get this from /proc/<debugged-id>/map, but this is rather mechanical, so if LLDB can get that for me, it would save me from doing that myself.
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
More information about the lldb-dev