Add option to objdump/readelf to disable access to debuginfod servers.

* dwarf.c (use_debuginfod): New variable.  Set to 1.
	(load_separate_debug_info): Only call
	debuginfod_fetch_separate_debug_info is use_debuginfod is true.
	(dwarf_select_sections_by_names): Add do-not-use-debuginfod and
	use-debuginfod options.
	(dwarf_select_sections_by_letters): Add D and E options.
	* dwarf.h (use_debuginfod): New extern.
	* objdump.c (usage): Mention the new options.
	* readelf.c (usage): Likewise.
	* doc/binutils.texi: Document the new options.
	* doc/debug-options.texi: Describe the new options.
	* NEWS: Mention the new feature.
	* testsuite/binutils-all/debuginfod.exp: Add tests of the new
	options.
This commit is contained in:
Nick Clifton
2022-03-10 09:11:40 +00:00
parent d7c448293a
commit bed566bbf6
9 changed files with 105 additions and 12 deletions

View File

@ -185,8 +185,14 @@ proc test_fetch_debugaltlink { prog progargs } {
}
if { [regexp ".*DEBUGINFOD.*" $conf_objdump] } {
test_fetch_debuglink $OBJDUMP "-W"
test_fetch_debuglink $OBJDUMP "-W -WD"
test_fetch_debugaltlink $OBJDUMP "-Wk"
set test "disabling debuginfod access"
setup_xfail *-*-*
test_fetch_debuglink $OBJDUMP "-W -WE"
set test "debuginfod"
} else {
untested "$test (objdump not configured with debuginfod)"
}
@ -194,6 +200,12 @@ if { [regexp ".*DEBUGINFOD.*" $conf_objdump] } {
if { [regexp ".*DEBUGINFOD.*" $conf_readelf] } {
test_fetch_debuglink $READELF "-w"
test_fetch_debugaltlink $READELF "-wk"
set test "disabling debuginfod access"
setup_xfail *-*-*
test_fetch_debuglink $READELF "-w -wE"
set test "debuginfod"
} else {
untested "$test (readelf not configured with debuginfod)"
}