From 3f5864e1f47b2678c57a84c619c3b04d63e31e49 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Sat, 6 Oct 2001 10:01:09 +0000 Subject: [PATCH] * dwarf2.c (comp_unit_find_nearest_line): Check for end of compilation unit. --- bfd/ChangeLog | 5 +++++ bfd/dwarf2.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dc4a5d71e9..b867e71447 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-10-06 Alan Modra * bfd.c (bfd_assert): Report bfd version. diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 7126360006..6edbc0b9b9 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -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;