* dwarf2read.c (dw2_get_file_names_reader): Ignore partial units.
authorTom Tromey <tromey@redhat.com>
Mon, 11 Jun 2012 20:19:22 +0000 (20:19 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 11 Jun 2012 20:19:22 +0000 (20:19 +0000)
gdb/ChangeLog
gdb/dwarf2read.c

index 1a50740a4d3e4046cb2832fb7ba996e413421d7e..61ea7629ee7bced68471dc7048dc69538bc12497 100644 (file)
@@ -1,3 +1,7 @@
+2012-06-11  Tom Tromey  <tromey@redhat.com>
+
+       * dwarf2read.c (dw2_get_file_names_reader): Ignore partial units.
+
 2012-06-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Fix regression by the "ambiguous linespec" series.
index 7e25d08aecb57b7fb122b5eebe53a8884feff79a..1fdd81916c263bfaf5ba9b8108b637c33f74c13d 100644 (file)
@@ -2449,6 +2449,14 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader,
   struct quick_file_names *qfn;
   unsigned int line_offset;
 
+  /* Our callers never want to match partial units -- instead they
+     will match the enclosing full CU.  */
+  if (comp_unit_die->tag == DW_TAG_partial_unit)
+    {
+      this_cu->v.quick->no_file_data = 1;
+      return;
+    }
+
   lh = NULL;
   slot = NULL;
   line_offset = 0;