aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-01-09 17:01:15 +0000
committerIan Lance Taylor <ian@airs.com>1996-01-09 17:01:15 +0000
commitc40d9c773f793dcf9177cec4ba203c3712df79ce (patch)
tree3bd91cfe92d05adb275693874175311240476d80 /bfd
parent60d5a517fb068e9466e32736336b49ad89fefa76 (diff)
downloadgdb-c40d9c773f793dcf9177cec4ba203c3712df79ce.zip
gdb-c40d9c773f793dcf9177cec4ba203c3712df79ce.tar.gz
gdb-c40d9c773f793dcf9177cec4ba203c3712df79ce.tar.bz2
* ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
numbers to the .text section. PR 8767.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/ecoff.c20
2 files changed, 12 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ea3016a..0f3acac 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
+ numbers to the .text section.
+
Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
* ieee.c (ieee_write_debug_part): Change return type to boolean.
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index e4acd83..3524fc5 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1,5 +1,5 @@
/* Generic ECOFF (Extended-COFF) routines.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -262,7 +262,7 @@ ecoff_get_magic (abfd)
break;
}
- return abfd->xvec->byteorder_big_p ? big : little;
+ return bfd_big_endian (abfd) ? big : little;
case bfd_arch_alpha:
return ALPHA_MAGIC;
@@ -1813,12 +1813,6 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
struct ecoff_debug_info * const debug_info = &ecoff_data (abfd)->debug_info;
struct ecoff_find_line *line_info;
- /* If we're not in the .text section, we don't have any line
- numbers. */
- if (strcmp (section->name, _TEXT) != 0
- || offset >= bfd_section_size (abfd, section))
- return false;
-
/* Make sure we have the FDR's. */
if (! _bfd_ecoff_slurp_symbolic_info (abfd, (asection *) NULL, debug_info)
|| bfd_get_symcount (abfd) == 0)
@@ -2619,7 +2613,7 @@ _bfd_ecoff_write_object_contents (abfd)
if (abfd->flags & EXEC_P)
internal_f.f_flags |= F_EXEC;
- if (! abfd->xvec->byteorder_big_p)
+ if (bfd_little_endian (abfd))
internal_f.f_flags |= F_AR32WR;
else
internal_f.f_flags |= F_AR32W;
@@ -2970,9 +2964,9 @@ _bfd_ecoff_slurp_armap (abfd)
/* Make sure we have the right byte ordering. */
if (((nextname[ARMAP_HEADER_ENDIAN_INDEX] == ARMAP_BIG_ENDIAN)
- ^ (abfd->xvec->header_byteorder_big_p != false))
+ ^ (bfd_header_big_endian (abfd)))
|| ((nextname[ARMAP_OBJECT_ENDIAN_INDEX] == ARMAP_BIG_ENDIAN)
- ^ (abfd->xvec->byteorder_big_p != false)))
+ ^ (bfd_big_endian (abfd))))
{
bfd_set_error (bfd_error_wrong_format);
return false;
@@ -3129,12 +3123,12 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
strcpy (hdr.ar_name, ecoff_backend (abfd)->armap_start);
hdr.ar_name[ARMAP_HEADER_MARKER_INDEX] = ARMAP_MARKER;
hdr.ar_name[ARMAP_HEADER_ENDIAN_INDEX] =
- (abfd->xvec->header_byteorder_big_p
+ (bfd_header_big_endian (abfd)
? ARMAP_BIG_ENDIAN
: ARMAP_LITTLE_ENDIAN);
hdr.ar_name[ARMAP_OBJECT_MARKER_INDEX] = ARMAP_MARKER;
hdr.ar_name[ARMAP_OBJECT_ENDIAN_INDEX] =
- abfd->xvec->byteorder_big_p ? ARMAP_BIG_ENDIAN : ARMAP_LITTLE_ENDIAN;
+ bfd_big_endian (abfd) ? ARMAP_BIG_ENDIAN : ARMAP_LITTLE_ENDIAN;
memcpy (hdr.ar_name + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1);
/* Write the timestamp of the archive header to be just a little bit