llvm-project/lldb/source/Plugins/Process
Pavel Labath ee7ceacaca minidump: Add ability to attach (breakpad) symbol files to placeholder modules
This re-commits r354263, which was because it uncovered with handling of
modules with empty (zero) UUIDs. This would cause us to treat two
modules as intentical even though they were not. This caused an assert
in PlaceholderObjectFile::SetLoadAddress to fire, because we were trying
to load the module twice even though it was designed to be only loaded
at a specific address. (The same problem also existed with the previous
implementation, but it had no asserts to warn us about this.) These
issues have now been fixed in r356896.

windows bot. The issue there was that ObjectFilePECOFF vended its base
address through the incorrect interface. SymbolFilePDB depended on that,
which lead to assertion failures when SymbolFilePDB was attempting to
use the placeholder object files as a base. This has been fixed in
r354258

The original commit message was:

The reason this wasn't working was that ProcessMinidump was creating odd
object-file-less modules, and SymbolFileBreakpad required the module to
have an associated object file because it needed to get its base
address.

This fixes that by introducing a PlaceholderObjectFile to serve as a
dummy object file. The general idea for this is taken from D55142, but
I've reworked it a bit to avoid the need for the PlaceholderModule
class. Now that we have an object file, our modules are sufficiently
similar to regular modules that we can use the regular Module class
almost out of the box -- the only thing I needed to tweak was the
Module::CreateModuleFromObjectFile functon to set the module's FileSpec
in addition to it's architecture. This wasn't needed for ObjectFileJIT
(the other user of CreateModuleFromObjectFile), but it shouldn't hurt it
either, and the change seems like a straightforward extension of this
function.

Reviewers: clayborg, lemo, amccarth

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D57751

llvm-svn: 357060
2019-03-27 10:54:10 +00:00
..
Darwin Bring Doxygen comment syntax in sync with LLVM coding style. 2019-03-11 17:09:29 +00:00
FreeBSD [lldb] Add missing EINTR handling 2019-03-21 19:35:55 +00:00
Linux [lldb] Add missing EINTR handling 2019-03-21 19:35:55 +00:00
MacOSX-Kernel Try to fix OSX compilation failure. 2019-03-06 18:44:27 +00:00
NetBSD [lldb] [Process/NetBSD] Use nullptr to fix template arg deduction 2019-03-25 22:29:29 +00:00
POSIX Bring Doxygen comment syntax in sync with LLVM coding style. 2019-03-11 17:09:29 +00:00
Utility Fix an out-of-bounds error in RegisterContextDarwin_arm64 2019-03-27 09:39:46 +00:00
Windows/Common [win] Resolve the module only if there isn't one already 2019-02-15 21:40:59 +00:00
elf-core [lldb] [Process] Add proper support for NetBSD core files with threads 2019-03-08 21:10:43 +00:00
gdb-remote [Reproducers] Fix GDB remote flakiness during replay 2019-03-22 23:33:17 +00:00
mach-core Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
minidump minidump: Add ability to attach (breakpad) symbol files to placeholder modules 2019-03-27 10:54:10 +00:00
CMakeLists.txt Enable ProcessMachCore plugin on non-apple platforms 2018-05-22 16:33:43 +00:00