Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Use bfd_xcoff_is_xcoff64() in xcoffread.c and rs6000-tdep.c
Date: Mon, 29 Apr 2002 17:35:00 -0000	[thread overview]
Message-ID: <1020430003311.ZM18225@localhost.localdomain> (raw)

I've just committed the patch below.  It's needed for debugging 64-bit
binaries on AIX 5.1.

	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.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.61
diff -u -p -r1.61 rs6000-tdep.c
--- rs6000-tdep.c	29 Apr 2002 15:10:06 -0000	1.61
+++ rs6000-tdep.c	29 Apr 2002 23:39:53 -0000
@@ -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
      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;
Index: xcoffread.c
===================================================================
RCS file: /cvs/src/src/gdb/xcoffread.c,v
retrieving revision 1.18
diff -u -p -r1.18 xcoffread.c
--- xcoffread.c	2 Dec 2001 22:38:23 -0000	1.18
+++ xcoffread.c	29 Apr 2002 23:39:54 -0000
@@ -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
   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;


                 reply	other threads:[~2002-04-30  0:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020430003311.ZM18225@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox