diff options
author | Doug Evans <dje@google.com> | 2013-12-11 15:52:12 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-12-11 15:52:12 -0800 |
commit | 43942612f4278418e9b6c48c86e4f02798611f74 (patch) | |
tree | e2718294f2f87bc609b722bf73a026ad1b959dfc /gdb/dwarf2read.c | |
parent | 34e627b73c575a1f2721bf5a7d6135eafda9eac0 (diff) | |
download | gdb-43942612f4278418e9b6c48c86e4f02798611f74.zip gdb-43942612f4278418e9b6c48c86e4f02798611f74.tar.gz gdb-43942612f4278418e9b6c48c86e4f02798611f74.tar.bz2 |
* dwarf2read.c (lookup_dwo_cutu): Include name of dwp file in
"can't find DWO" warning.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 1c7dfc5..f057afa 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -10675,11 +10675,25 @@ lookup_dwo_cutu (struct dwarf2_per_cu_data *this_unit, /* This is a warning and not a complaint because it can be caused by pilot error (e.g., user accidentally deleting the DWO). */ - warning (_("Could not find DWO %s %s(%s) referenced by %s at offset 0x%x" - " [in module %s]"), - kind, dwo_name, hex_string (signature), - this_unit->is_debug_types ? "TU" : "CU", - this_unit->offset.sect_off, objfile_name (objfile)); + { + /* Print the name of the DWP file if we looked there, helps the user + better diagnose the problem. */ + char *dwp_text = NULL; + struct cleanup *cleanups; + + if (dwp_file != NULL) + dwp_text = xstrprintf (" [in DWP file %s]", lbasename (dwp_file->name)); + cleanups = make_cleanup (xfree, dwp_text); + + warning (_("Could not find DWO %s %s(%s)%s referenced by %s at offset 0x%x" + " [in module %s]"), + kind, dwo_name, hex_string (signature), + dwp_text != NULL ? dwp_text : "", + this_unit->is_debug_types ? "TU" : "CU", + this_unit->offset.sect_off, objfile_name (objfile)); + + do_cleanups (cleanups); + } return NULL; } |