When loading separate debug info files, also attempt to locate a file based upon the build-id.

PR 28697
	* dwarf.c (load_build_id_debug_file): New function.
	(try_build_id_prefix): New function.
	(check_for_and_load_links): Call load_build_id_debug_file.
	(debug_displays): Add entry for .note.gnu.build-id.
	* dwarf.h (enum dwarf_section_display_enum): Add
	note_gnu_build_id.
	* testsuite/binutils-all/debuginfod.exp (test_fetch_debuglink):
	Fix regexp for loads via debuglink section.
This commit is contained in:
Nick Clifton
2021-12-16 14:05:40 +00:00
parent a2b1ea81ba
commit 61ab1364c7
4 changed files with 131 additions and 4 deletions

View File

@ -161,10 +161,10 @@ proc test_fetch_debuglink { prog progargs } {
set got [binutils_run $prog "$progargs tmpdir/testprog"]
if { [regexp ".*Found separate debug info file.*Contents\[^\n\]*loaded from\[^\n\]*$cache.*" $got] } {
if { [regexp ".*Found separate debug info file.*Contents\[^\n\]*loaded from\[^\n\]*" $got] } {
pass "$test ($prog debuglink)"
} else {
fail "$test ($prog debuglink)"
fail "$test ($prog did not find debuglink to cache $cache)"
}
}
@ -180,7 +180,7 @@ proc test_fetch_debugaltlink { prog progargs } {
if { [regexp ".*Found separate debug info file\[^\n\]*$cache/$buildid" $got] } {
pass "$test ($prog debugaltlink)"
} else {
fail "$test ($prog debugaltlink)"
fail "$test ($prog could not load debugaltlink)"
}
}