This is an archive of the discontinued LLVM Phabricator instance.

Implement GetMemoryRegionInfo for mini dumps.
ClosedPublic

Authored by amccarth on Dec 3 2015, 4:18 PM.

Details

Summary

Also tweaked process save-core to include the memory info list so that we can see the regions in the list.

There are no commands or SBInterfaces yet that make it possible to test this directly, but I'll look for an opportunity to do so as I continue to work toward working backtraces from mini dumps.

Diff Detail

Event Timeline

amccarth updated this revision to Diff 41824.Dec 3 2015, 4:18 PM
amccarth retitled this revision from to Implement GetMemoryRegionInfo for mini dumps..
amccarth updated this object.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.
amccarth updated this revision to Diff 41828.Dec 3 2015, 4:32 PM

Ran clang-format and removed initialization of a local variable that was no longer used.

Note that clang-format re-ordered the include because the change added one include.

zturner added inline comments.Dec 3 2015, 4:38 PM
source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
312

ProcessWindowsLive::GetMemoryRegionInfo already has this same logic built in. Would it be worth putting something in Plugins/Process/Windows/Common that does this conversion and then calling into it from both here and ProcessWindowsLive?

source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
87–91

Oh yea, I forgot to mention. clang-format screws this up currently. You'll have to fix this part manually :(

I keep meaning to go look at clang-format's source and make it support return type on new line, but so far you have to fix these manually.

amccarth marked 2 inline comments as done.Dec 4 2015, 8:42 AM

Addressed comments.

amccarth updated this revision to Diff 41884.Dec 4 2015, 8:43 AM

Address comments.

Factored the decoding of the page protection bits to share that logic between the live and mini dump debugging.

amccarth updated this revision to Diff 41898.Dec 4 2015, 10:37 AM

After discussion with Zach, we concluded that his original logic for IsPageReadable was better.

This revision was automatically updated to reflect the committed changes.