aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-06-11 23:16:01 +0200
committerSimon Marchi <simon.marchi@ericsson.com>2017-06-11 23:16:28 +0200
commitc4dcb155c446cee135101d72172b47e3fc99caf9 (patch)
tree5e69677386d293f20ddebb33b6dafb327f554588 /gdb/doc
parent9b97dfbf8049bed3b2f79c6c785afaf18206dad3 (diff)
downloadgdb-c4dcb155c446cee135101d72172b47e3fc99caf9.zip
gdb-c4dcb155c446cee135101d72172b47e3fc99caf9.tar.gz
gdb-c4dcb155c446cee135101d72172b47e3fc99caf9.tar.bz2
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.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdb.texinfo6
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 868cde9..aa4a9ce 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdb.texinfo (Optional Messages about Internal Happenings):
+ Document {set,show} debug separate-debug-file commands.
+
2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.texinfo (Starting) <startup-with-shell>: Add @anchor.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8d7a1c9..c167a86 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23984,6 +23984,12 @@ the serial line to the remote machine. The info is printed on the
@value{GDBN} standard output stream. The default is off.
@item show debug remote
Displays the state of display of remote packets.
+
+@item set debug separate-debug-file
+Turns on or off display of debug output about separate debug file search.
+@item show debug separate-debug-file
+Displays the state of separate debug file search debug output.
+
@item set debug serial
Turns on or off display of @value{GDBN} serial debugging info. The
default is off.