* dwarf2.c (comp_unit_find_nearest_line): Check for end of
authorStephane Carrez <stcarrez@nerim.fr>
Sat, 6 Oct 2001 10:01:09 +0000 (10:01 +0000)
committerStephane Carrez <stcarrez@nerim.fr>
Sat, 6 Oct 2001 10:01:09 +0000 (10:01 +0000)
compilation unit.

bfd/ChangeLog
bfd/dwarf2.c

index dc4a5d71e9fe1bf9dcca0f6348acd9d7f4999899..b867e71447d14e09f4675413981611adada506fd 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
+
+       * dwarf2.c (comp_unit_find_nearest_line): Check for end of
+       compilation unit.
+
 2001-10-06  Alan Modra  <amodra@bigpond.net.au>
 
        * bfd.c (bfd_assert): Report bfd version.
index 71263600069f3618373a0bd69fb5aa43ba9c02c2..6edbc0b9b952b188e318fab14879ad548b055e6a 100644 (file)
@@ -1551,7 +1551,8 @@ comp_unit_find_nearest_line (unit, addr,
          return false;
        }
 
-      if (! scan_unit_for_functions (unit))
+      if (unit->first_child_die_ptr < unit->end_ptr
+          && ! scan_unit_for_functions (unit))
        {
          unit->error = 1;
          return false;