0

I want to display all memory mappings of the debugged process, including stack and heap, using LLDB.

Currently, I only know of LLDB's image dump sections, but it only displays memory mappings corresponding to segments/segments of the Mach-O binary, and not dynamic memory mappings (e.g. stack and heap) like GDB's info proc mappings.

I know I can use vmmap from another terminal window to obtain this information, but it must be possible to do this from LLDB itself.

Shuzheng
  • 11,288
  • 20
  • 88
  • 186
  • This is the same question as: https://stackoverflow.com/questions/58254053/a-way-to-view-memory-allocation-in-xcode-lldb – Jim Ingham Oct 09 '19 at 18:15
  • @JimIngham - thanks. `But lldb doesn't have a general "show me all allocated memory regions" command, like malloc_stats.` -- what's the reason that LLDB doesn't implement `info proc mappings`, like GDB and WinDbg? – Shuzheng Oct 10 '19 at 04:01
  • This isn't a matter of principle, just resources. There are generally other tools that do this job, on macOS there certainly are both from the command line and in Xcode. So the memory tools in lldb are focused on "tell me about this address" rather than "tell me about all addresses", as that is the kind of query you are more likely to do in the debugger. But if somebody had a good patch to implement this functionality, it would surely be welcomed. – Jim Ingham Oct 10 '19 at 18:06

0 Answers0