aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-01-22 08:54:20 +0000
committerAlan Modra <amodra@gmail.com>2009-01-22 08:54:20 +0000
commitbe04437d39bd4b3599ba5fe7e114b49f47ca7a88 (patch)
tree594994e7b98b902e094382edcf521f8e1c69e986 /bfd/dwarf2.c
parent8b700390bfce6106a68011dac8e180e3061fa6c7 (diff)
downloadgdb-be04437d39bd4b3599ba5fe7e114b49f47ca7a88.zip
gdb-be04437d39bd4b3599ba5fe7e114b49f47ca7a88.tar.gz
gdb-be04437d39bd4b3599ba5fe7e114b49f47ca7a88.tar.bz2
PR 6832
* dwarf2.c (find_line): Don't update stash->sec_info_ptr until after comp_unit_find_line call.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index f1f6c90..4f2e38c 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1,6 +1,6 @@
/* DWARF 2 support.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
(gavin@cygnus.com).
@@ -3189,13 +3189,6 @@ find_line (bfd *abfd,
break;
stash->info_ptr += length;
- if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
- == stash->sec->size)
- {
- stash->sec = find_debug_info (stash->bfd, stash->sec);
- stash->sec_info_ptr = stash->info_ptr;
- }
-
if (stash->all_comp_units)
stash->all_comp_units->prev_unit = each;
else
@@ -3225,6 +3218,14 @@ find_line (bfd *abfd,
functionname_ptr,
linenumber_ptr,
stash));
+
+ if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
+ == stash->sec->size)
+ {
+ stash->sec = find_debug_info (stash->bfd, stash->sec);
+ stash->sec_info_ptr = stash->info_ptr;
+ }
+
if (found)
goto done;
}