Wed May 11 00:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+ * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
+ correctly.
+
* Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
make to invoke the shell.
char *pdr_ptr;
char *pdr_end;
PDR pdr;
+ bfd_vma first_off;
unsigned char *line_ptr;
unsigned char *line_end;
int lineno;
+ fdr_ptr->ipdFirst * external_pdr_size);
pdr_end = pdr_ptr + fdr_ptr->cpd * external_pdr_size;
(*debug_swap->swap_pdr_in) (abfd, (PTR) pdr_ptr, &pdr);
+ if (offset < pdr.adr)
+ return false;
/* The address of the first PDR is an offset which applies to the
addresses of all the PDR's. */
- offset += pdr.adr;
+ first_off = pdr.adr;
for (pdr_ptr += external_pdr_size;
pdr_ptr < pdr_end;
pdr_ptr -= external_pdr_size;
(*debug_swap->swap_pdr_in) (abfd, (PTR) pdr_ptr, &pdr);
- offset -= pdr.adr;
+ offset -= pdr.adr - first_off;
lineno = pdr.lnLow;
line_ptr = (ecoff_data (abfd)->debug_info.line
+ fdr_ptr->cbLineOffset