From: Stephane Carrez Date: Sun, 7 Oct 2001 21:36:13 +0000 (+0000) Subject: * dwarf2.c (comp_unit_find_nearest_line): Check for end of X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7d80a5dc4e4a8922d4a6dbbcda2f5791f9ae2936;p=thirdparty%2Fbinutils-gdb.git * dwarf2.c (comp_unit_find_nearest_line): Check for end of compilation unit. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c9d40d08b27..fcfc6c93e15 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-10-06 Stephane Carrez + + * dwarf2.c (comp_unit_find_nearest_line): Check for end of + compilation unit. + 2001-08-29 Joel Sherrill * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 4a032732c98..2161846de95 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -1431,7 +1431,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;