]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
backport 2009-01-22 Alan Modra <amodra@bigpond.net.au>
authorAlan Modra <amodra@gmail.com>
Mon, 2 Mar 2009 13:50:55 +0000 (13:50 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 2 Mar 2009 13:50:55 +0000 (13:50 +0000)
bfd/ChangeLog
bfd/dwarf2.c

index 831b3960ddf29b78aaa3f8f029b297608b2c770a..bc02ce85f46f883e27a05be8a26bf9a85e666e15 100644 (file)
@@ -1,5 +1,10 @@
 2009-03-02  Alan Modra  <amodra@bigpond.net.au>
 
+       2009-01-22  Alan Modra  <amodra@bigpond.net.au>
+       PR 6832
+       * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
+       after comp_unit_find_line call.
+
        2009-01-14  Alan Modra  <amodra@bigpond.net.au>
        PR 9735
        * syms.c (_bfd_stab_section_find_nearest_line): Don't free
index b53a5d45d6e53c0e05ef1aa0363bfb5056eff493..dae271d500c14bb5924dd480227255962bc1bc82 100644 (file)
@@ -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).
@@ -3186,13 +3186,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
@@ -3222,6 +3215,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;
        }