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

@ -281,6 +281,14 @@ usage (FILE *stream, int status)
-WN,--dwarf=no-follow-links\n\
Do not follow links to separate debug info files\n\
(default)\n"));
#endif
#if HAVE_LIBDEBUGINFOD
fprintf (stream, _("\
-WD --dwarf=use-debuginfod\n\
When following links, also query debuginfod servers (default)\n"));
fprintf (stream, _("\
-WE --dwarf=do-not-use-debuginfod\n\
When following links, do not query debuginfod servers\n"));
#endif
fprintf (stream, _("\
-L, --process-links Display the contents of non-debug sections in\n\