forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb][debuginfod] Fix the DebugInfoD PR that caused issues when work…
…ing with stripped binaries (llvm#99362) @walter-erquinigo found the the [PR with testing and a fix for DebugInfoD](llvm#98344) caused an issue when working with stripped binaries. The issue is that when you're working with split-dwarf, there are *3* possible files: The stripped binary the user is debugging, the "only-keep-debug" *or* unstripped binary, plus the `.dwp` file. The debuginfod plugin should provide the unstripped/OKD binary. However, if the debuginfod plugin fails, the default symbol locator plugin will just return the stripped binary, which doesn't help. So, to address that, the SymbolVendorELF code checks to see if the SymbolLocator's ExecutableObjectFile request returned the same file, and bails if that's the case. You can see the specific diff as the second commit in the PR. I'm investigating adding a test: I can't quite get a simple repro, and I'm unwilling to make any additional changes to Makefile.rules to this diff, for Pavlovian reasons.
- Loading branch information
1 parent
27e1117
commit 77df3f1
Showing
13 changed files
with
549 additions
and
21 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Order matters here: the first symbol locator prevents further searching. | ||
# For DWARF binaries that are both stripped and split, the Default plugin | ||
# will return the stripped binary when asked for the ObjectFile, which then | ||
# prevents an unstripped binary from being requested from the Debuginfod | ||
# provider. | ||
add_subdirectory(Debuginfod) | ||
add_subdirectory(Default) | ||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin") | ||
add_subdirectory(DebugSymbols) | ||
endif() | ||
add_subdirectory(Debuginfod) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
C_SOURCES := main.c | ||
|
||
# For normal (non DWP) Debuginfod tests, we need: | ||
|
||
# * The full binary: a.out.unstripped | ||
# Produced by Makefile.rules with SAVE_FULL_DEBUG_BINARY set to YES and | ||
# SPLIT_DEBUG_SYMBOLS set to YES | ||
|
||
# * The stripped binary (a.out) | ||
# Produced by Makefile.rules with SPLIT_DEBUG_SYMBOLS set to YES | ||
|
||
# * The 'only-keep-debug' binary (a.out.debug) | ||
# Produced below | ||
|
||
SPLIT_DEBUG_SYMBOLS := YES | ||
SAVE_FULL_DEBUG_BINARY := YES | ||
GEN_GNU_BUILD_ID := YES | ||
|
||
include Makefile.rules |
Oops, something went wrong.