summaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-10-06 10:01:09 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-10-06 10:01:09 +0000
commit382d6d08c7a364cfda22281428014e79167dbe86 (patch)
tree79497f603f9423a193036ffbc0367c86c86eae5a /bfd/dwarf2.c
parent7574afe6d7d9b9c56f42b728a329217f6235f609 (diff)
downloadgdb-382d6d08c7a364cfda22281428014e79167dbe86.tar.gz
* dwarf2.c (comp_unit_find_nearest_line): Check for end of
compilation unit.
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 71263600069..6edbc0b9b95 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;