binutils-gdb/gdb/doc
Simon Marchi c4dcb155c4 Introduce "set debug separate-debug-file"
I helped someone figure out why their separate debug info (debug
link-based) was not found by gdb.  It turns out that the debug file was
not named properly.  It made me realize that it is quite difficult to
diagnose this kind of problems.  This patch adds some debug output to
show where GDB looks for those files, so that it should be (more)
obvious to find what's wrong.

Here's an example of the result, first with an example of unsuccessful lookup,
and then a successful one.

  (gdb) set debug separate-debug-file on
  (gdb) file /usr/bin/gnome-calculator
  Reading symbols from /usr/bin/gnome-calculator...
  Looking for separate debug info (build-id) for /usr/bin/gnome-calculator
    Trying /usr/local/lib/debug/.build-id/0d/5c5e8c86dbe4f4f95f7a13de04f91d377f3c6a.debug

  Looking for separate debug info (debug link) for /usr/bin/gnome-calculator
    Trying /usr/bin/5c5e8c86dbe4f4f95f7a13de04f91d377f3c6a.debug
    Trying /usr/bin/.debug/5c5e8c86dbe4f4f95f7a13de04f91d377f3c6a.debug
    Trying /usr/local/lib/debug//usr/bin/5c5e8c86dbe4f4f95f7a13de04f91d377f3c6a.debug
  (no debugging symbols found)...done.
  (gdb) set debug-file-directory /usr/lib/debug
  (gdb) file /usr/bin/gnome-calculator
  Reading symbols from /usr/bin/gnome-calculator...
  Looking for separate debug info by build-id for /usr/bin/gnome-calculator
    Trying /usr/lib/debug/.build-id/0d/5c5e8c86dbe4f4f95f7a13de04f91d377f3c6a.debug
  Reading symbols from /usr/lib/debug/.build-id/0d/5c5e8c86dbe4f4f95f7a13de04f91d377f3c6a.debug...done.
  done.

Note: here, the debug link happens to be named like the build-id, but it
doesn't have to be this way.  It puzzled me for a minute.

gdb/ChangeLog:

	* NEWS (Changes since GDB 8.0): Announce {set,show} debug
	separate-debug-file commands.
	* symfile.h (separate_debug_file_debug): New global.
	* symfile.c (separate_debug_file_debug): New global.
	(separate_debug_file_exists, find_separate_debug_file): Add
	debug output.
	(_initialize_symfile): Add "set debug separate-debug-file"
	command.
	* build-id.c (build_id_to_debug_bfd,
	find_separate_debug_file_by_buildid): Add debug output.

gdb/doc/ChangeLog:

	* gdb.texinfo (Optional Messages about Internal Happenings):
	Document {set,show} debug separate-debug-file commands.
2017-06-11 23:16:28 +02:00
..
.gitignore Update and add .gitignore's 2016-09-21 13:12:21 -04:00
ChangeLog Introduce "set debug separate-debug-file" 2017-06-11 23:16:28 +02:00
Doxyfile-base.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
Doxyfile-gdb-api.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
Doxyfile-gdb-xref.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
Doxyfile-gdbserver.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
Makefile.in Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files) 2017-05-06 10:09:35 -04:00
a4rc.sed
agentexpr.texi update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
all-cfg.texi update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
annotate.texinfo update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
doxy-index.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
fdl.texi
filter-for-doxygen Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
filter-params.pl Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
gdb.texinfo Introduce "set debug separate-debug-file" 2017-06-11 23:16:28 +02:00
gpl.texi
guile.texi Lazy strings can be made from arrays too. 2017-03-16 09:22:51 -07:00
lpsrc.sed
observer.texi update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
psrc.sed
python.texi Python: Introduce gdb.Instruction class 2017-05-02 11:35:54 +02:00
refcard.tex update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
stabs.texinfo update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
stack_frame.eps
stack_frame.pdf
stack_frame.png
stack_frame.svg
stack_frame.txt