1. minidump: Add an "arm64" constant (details)
  2. minidump: Create memory regions from the sections of loaded modules (details)
Commit e9430231accacdb872bc4c82feb9a6a64d57941b by pavel
minidump: Add an "arm64" constant
This is the "official" constant for arm64. We also have another constant
for arm64 (called BP_ARM64), which was used by breakpad while there was
no official constant for arm64 available.
The file was modifiedllvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
The file was modifiedllvm/lib/ObjectYAML/MinidumpYAML.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/MinidumpConstants.def
Commit 193a7bfb697b5d2adb1c3d37a9d624aa8131ec35 by pavel
minidump: Create memory regions from the sections of loaded modules
Summary: Not all minidumps contain information about memory permissions.
However, it is still important to know which regions of memory contain
potentially executable code. This is particularly important for
unwinding on win32, as the default unwind method there relies on
scanning the stack for things which "look like" code pointers.
This patch enables ProcessMinidump to reconstruct the likely permissions
of memory regions using the sections of loaded object files. It only
does this if we don't have a better source (memory info list stream, or
linux /proc/maps) for this information, and only if the information in
the object files does not conflict with the information in the minidump.
Theoretically that last bit could be improved, since the permissions
obtained from the MemoryList streams is also only a very rough guess,
but it did not seem worthwhile to complicate the implementation because
of that because there will generally be no overlap in practice as the
MemoryList will contain the stack contents and not any module data.
The patch adds a test checking that the module section permissions are
entered into the memory region list, and also a test which demonstrate
that now the unwinder is able to correctly find return addresses even in
minidumps without memory info list streams.
There's one TODO left in this patch, which is that the "memory region"
output does not give any indication about the "don't know" values of
memory region permissions (it just prints them as if they permission bit
was set). I address this in a follow up.
Reviewers: amccarth, clayborg
Subscribers: mgrang, lldb-commits
Differential Revision:
The file was addedlldb/test/Shell/Minidump/memory-region-from-module.yaml
The file was addedlldb/test/Shell/Minidump/Inputs/basic-elf.yaml
The file was addedlldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
The file was modifiedlldb/source/Plugins/Process/minidump/ProcessMinidump.cpp