From: Alan Modra Date: Thu, 14 Aug 2008 02:38:22 +0000 (+0000) Subject: * coffgen.c (coff_find_nearest_line): Correct cached line index. X-Git-Tag: binutils-2_19-branchpoint~228 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70df0c05f204148bbdd9476bffce4630a8798777;p=external%2Fbinutils.git * coffgen.c (coff_find_nearest_line): Correct cached line index. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4e2baac..b9cec11 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2008-08-14 Jaka Močnik + + * coffgen.c (coff_find_nearest_line): Correct cached line index. + 2008-08-12 Alan Modra * elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 98b5bbe..17d46a2 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -2145,7 +2145,7 @@ coff_find_nearest_line (bfd *abfd, } /* Now wander though the raw linenumbers of the section. */ - /* If we have been called on this section before, and th. e offset we + /* If we have been called on this section before, and the offset we want is further down then we can prime the lookup loop. */ sec_data = coff_section_data (abfd, section); if (sec_data != NULL @@ -2232,7 +2232,7 @@ coff_find_nearest_line (bfd *abfd, if (sec_data != NULL) { sec_data->offset = offset; - sec_data->i = i; + sec_data->i = i - 1; sec_data->function = *functionname_ptr; sec_data->line_base = line_base; }