]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* dwarf2read.c (lookup_dwo_cutu): Include name of dwp file in
authorDoug Evans <dje@google.com>
Wed, 11 Dec 2013 23:52:12 +0000 (15:52 -0800)
committerDoug Evans <dje@google.com>
Wed, 11 Dec 2013 23:52:12 +0000 (15:52 -0800)
"can't find DWO" warning.

gdb/ChangeLog
gdb/dwarf2read.c

index 35a1d73f7fef8f7a3febbbe946fd7f65ca7207f2..40368b55bd8d0e7fda86ec170385b753cd6381fe 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-11  Doug Evans  <dje@google.com>
+
+       * dwarf2read.c (lookup_dwo_cutu): Include name of dwp file in
+       "can't find DWO" warning.
+
 2013-12-11  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * break-catch-throw.c (fetch_probe_arguments): Pass selected frame
index 1c7dfc54fbcf122d7bc584ebc68e6d442d3962e1..f057afad0bec8adc0afa64a1a2e469d603060258 100644 (file)
@@ -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;
 }