Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb] Minidump: check for .text hash match with directory
When opening a minidump, we might discover that it reports a UUID for a module that doesn't match the build ID, but rather a hash of the .text section (according to either of two different hash functions, used by breakpad and Facebook respectively). The current logic searches for a module by filename only to check the hash; this change updates it to first search by directory+filename. This is important when the directory specified in the minidump must be interpreted relative to a user-provided sysoort, as the leaf directory won't be in the search path in that case. Also add a regression test; without this change, module validation fails because we have just the placeholder module which reports as its path the platform path in the minidump. Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D89155 (cherry picked from commit d30797b)
- Loading branch information
1 parent
393eac1
commit 93fffe9
Showing
4 changed files
with
133 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
lldb/test/API/functionalities/postmortem/minidump-new/libbreakpad-decoy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This has different .text contents than libbreakpad-yaml, | ||
# to simulate having different versions of the module (to | ||
# test that we pick the one matching the minidump UUID). | ||
--- !ELF | ||
FileHeader: | ||
Class: ELFCLASS32 | ||
Data: ELFDATA2LSB | ||
Type: ET_DYN | ||
Machine: EM_ARM | ||
Flags: [ EF_ARM_SOFT_FLOAT, EF_ARM_EABI_VER5 ] | ||
Sections: | ||
Sections: | ||
- Name: .text | ||
Type: SHT_PROGBITS | ||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ] | ||
Address: 0x0000000000010000 | ||
AddressAlign: 0x0000000000000004 | ||
Content: 040000001400000003000000474E5500CC |