Skip to content

Apply to 11.x: LLDB fixes for minidumps with breakpad-style text hashing and user-specified sysroots #47397

@JosephTremoulet

Description

@JosephTremoulet
Bugzilla Link 48053
Resolution FIXED
Resolved on Dec 11, 2020 14:42
Version 11.0
OS Linux
Blocks #47144
Attachments Cherry-pick of 61bfc703c3d with conflicts resolved
CC @tstellar
Fixed by commit(s) 20f8425 4a55c98 0e6c9a6 d30797b 61bfc70 d20aa7c 561e1ce 98fa273 393eac1 93fffe9 b618cf7 abeec5d

Extended Description

Opening minidumps from breakpad with user-specified sysroots is a key scenario for us, so I'll need to support it downstream on 11.0.1. I'd like to request that these changes be included in the upstream 11.0.1 release.

This includes one fix for breakpad-style minidumps:
https://reviews.llvm.org/D89155 -- [lldb] Minidump: check for .text hash match with directory

And three fixes for opening minidumps with user-specified sysroots:
https://reviews.llvm.org/D88099 -- [lldb] Fix GetRemoteSharedModule fallback logic
https://reviews.llvm.org/D89155 -- [lldb] Minidump: check for .text hash match with directory
https://reviews.llvm.org/D89157 -- [lldb] Report old modules from ModuleList::ReplaceEquivalent

As well as one fix that was needed for a new testcase added in one of the above commits, to get that test passing on Windows:
4a55c98 -- [lldb] Normalize paths in new test

Plus one refactoring that one of the above depends on:
https://reviews.llvm.org/D89156 -- [lldb] GetSharedModule: Collect old modules in SmallVector

The refactoring doesn't apply cleanly to the 11.x branch, so I'm attaching a patch file that has it applied with conflicts resolved.

I've verified that the following script applies all of these cleanly to the 11.x branch (as of 8fc424f), and passes check-lldb:


git cherry-pick 20f84257ac4 # https://reviews.llvm.org/D88099 -- [lldb] Fix GetRemoteSharedModule fallback logic
git cherry-pick 4a55c98fa7b # (Fix test bug from D88099 for Windows build bot) -- [lldb] Normalize paths in new test
git cherry-pick 0e6c9a6e794 # https://reviews.llvm.org/D86261-- Add hashing of the .text section to ProcessMinidump.
git cherry-pick d30797b4041 # https://reviews.llvm.org/D89155 -- [lldb] Minidump: check for .text hash match with directory

# Next we need 61bfc703c3d # https://reviews.llvm.org/D89156 -- [lldb] GetSharedModule: Collect old modules in SmallVector
# but it doesn't cherry-pick cleanly, so apply the patch attached to the bug, which has the change but
# with conflicts resolved.
git apply --index pick-61bfc703c3d-resolved.txt
git commit --reuse-message=61bfc703c3d

git cherry-pick d20aa7ca422 # https://reviews.llvm.org/D89157 -- [lldb] Report old modules from ModuleList::ReplaceEquivalent

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions