aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 846aabe..f936cf3 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1333,6 +1333,10 @@ symbol_file_clear (int from_tty)
printf_unfiltered (_("No symbol file now.\n"));
}
+/* See symfile.h. */
+
+int separate_debug_file_debug = 0;
+
static int
separate_debug_file_exists (const char *name, unsigned long crc,
struct objfile *parent_objfile)
@@ -1351,6 +1355,9 @@ separate_debug_file_exists (const char *name, unsigned long crc,
if (filename_cmp (name, objfile_name (parent_objfile)) == 0)
return 0;
+ if (separate_debug_file_debug)
+ printf_unfiltered (_(" Trying %s\n"), name);
+
gdb_bfd_ref_ptr abfd (gdb_bfd_open (name, gnutarget, -1));
if (abfd == NULL)
@@ -1444,6 +1451,10 @@ find_separate_debug_file (const char *dir,
struct cleanup *back_to;
int ix;
+ if (separate_debug_file_debug)
+ printf_unfiltered (_("\nLooking for separate debug info (debug link) for "
+ "%s\n"), objfile_name (objfile));
+
/* Set I to std::max (strlen (canon_dir), strlen (dir)). */
i = strlen (dir);
if (canon_dir != NULL && strlen (canon_dir) > i)
@@ -3975,4 +3986,11 @@ full == print messages for the executable,\n\
NULL,
NULL,
&setprintlist, &showprintlist);
+
+ add_setshow_boolean_cmd ("separate-debug-file", no_class,
+ &separate_debug_file_debug, _("\
+Set printing of separate debug info file search debug."), _("\
+Show printing of separate debug info file search debug."), _("\
+When on, GDB prints the searched locations while looking for separate debug \
+info files."), NULL, NULL, &setdebuglist, &showdebuglist);
}