summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-04-30 00:26:44 +0000
committerKevin Buettner <kevinb@redhat.com>2002-04-30 00:26:44 +0000
commit7bf26a587d31b1942c6c9111f9529f9d6f676c76 (patch)
tree2e4904648eb28d3aa4cb9cb1c19092f49e7df702
parent28326fbb3baa88c0fc73cf2a98a16b00f9a459e4 (diff)
downloadgdb-7bf26a587d31b1942c6c9111f9529f9d6f676c76.tar.gz
Don't use BFD-private data to determine that an object file is 64-bit xcoff.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/rs6000-tdep.c4
-rw-r--r--gdb/xcoffread.c6
3 files changed, 16 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0667857047b..0a40faa69e4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-29 Kevin Buettner <kevinb@redhat.com>
+
+ From Louis Hamilton <hamilton@redhat.com>:
+ * rs6000-tdep.c (coff/xcoff.h, libxcoff.h): Include.
+ * xcoffread.c (coff/xcoff.h, libxcoff.h): Likewise.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use bfd_xcoff_is_xcoff64(),
+ not bfd-private xcoff data, to determine wordsize.
+ * xcoffread.c (read_xcoff_xymtab, read_symbol_lineno): Likewise.
+
2002-04-29 Andrew Cagney <ac131313@redhat.com>
GDB 5.2 released from 5.2 branch.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 8ccfb99efe5..72ceff024a2 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -38,6 +38,8 @@
#include "libbfd.h" /* for bfd_default_set_arch_mach */
#include "coff/internal.h" /* for libcoff.h */
#include "libcoff.h" /* for xcoff_data */
+#include "coff/xcoff.h"
+#include "libxcoff.h"
#include "elf-bfd.h"
@@ -2506,7 +2508,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
that, else choose a likely default. */
if (from_xcoff_exec)
{
- if (xcoff_data (info.abfd)->xcoff64)
+ if (bfd_xcoff_is_xcoff64 (info.abfd))
wordsize = 8;
else
wordsize = 4;
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 965473a54c4..d8781119774 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -38,6 +38,8 @@
#include "coff/internal.h"
#include "libcoff.h" /* FIXME, internal data from BFD */
+#include "coff/xcoff.h"
+#include "libxcoff.h"
#include "coff/rs6000.h"
#include "symtab.h"
@@ -908,7 +910,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
char *strtbl = ((struct coff_symfile_info *) objfile->sym_private)->strtbl;
char *debugsec =
((struct coff_symfile_info *) objfile->sym_private)->debugsec;
- char *debugfmt = xcoff_data (abfd)->xcoff64 ? "XCOFF64" : "XCOFF";
+ char *debugfmt = bfd_xcoff_is_xcoff64 (abfd) ? "XCOFF64" : "XCOFF";
struct internal_syment symbol[1];
union internal_auxent main_aux;
@@ -1632,7 +1634,7 @@ static int
read_symbol_lineno (int symno)
{
struct objfile *objfile = this_symtab_psymtab->objfile;
- boolean xcoff64 = xcoff_data (objfile->obfd)->xcoff64;
+ boolean xcoff64 = bfd_xcoff_is_xcoff64 (objfile->obfd);
struct coff_symfile_info *info =
(struct coff_symfile_info *)objfile->sym_private;