summaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c3
1 files changed, 2 insertions, 1 deletions
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;