Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <binutils@sourceware.org>, <gdb-patches@sourceware.org>
Subject: [RFA] Fix gdb compilation error in opcodes/dlx-dis.c with --enable-targets=all for mingw64
Date: Thu, 09 Sep 2010 16:16:00 -0000	[thread overview]
Message-ID: <003a01cb5033$7e045b40$7a0d11c0$@muller@ics-cnrs.unistra.fr> (raw)

  'unsigned long' type is 4-byte
on x86_64-w64-mingw systems, which is less
than a pointer size.
  After some searching, I found bfd_hostptr_t
type that is supposed to have the correct size of a host 
pointer.

  I tested the patch below by compilation 
with --enable-targets=all configure option
for i386-cygwin, x86_64-w64-mingw and x86_64-unknown-linux-gnu.

  I also ran the gdb testsuite on x86_64-unknown-linux-gnu
(gcc10 machine from gcc compile farm).
  No regression found.

  I don't know who is the main maintainer project
binutils or gdb?

  Who can give me the approval for this patch?
Is the patch itself OK?


Pierre Muller
Pascal language support maintainer for GDB


opcodes/ChangeLog entry:

2010-09-09  Pierre Muller  <muller@ics.u-strasbg.fr>

	* dlx-dis.c (print_insn_dlx): Use bfd_hostptr_t type for
	dlx_insn_type array.

Index: src/opcodes/dlx-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/dlx-dis.c,v
retrieving revision 1.5
diff -u -p -r1.5 dlx-dis.c
--- src/opcodes/dlx-dis.c	27 Jun 2010 04:07:55 -0000	1.5
+++ src/opcodes/dlx-dis.c	9 Sep 2010 12:06:19 -0000
@@ -437,16 +437,16 @@ print_insn_dlx (bfd_vma memaddr, struct 
   bfd_byte buffer[4];
   int insn_idx;
   unsigned long insn_word;
-  unsigned long dlx_insn_type[] =
+  bfd_hostptr_t dlx_insn_type[] =
   {
-    (unsigned long) dlx_r_type,
-    (unsigned long) dlx_load_type,
-    (unsigned long) dlx_store_type,
-    (unsigned long) dlx_aluI_type,
-    (unsigned long) dlx_br_type,
-    (unsigned long) dlx_jmp_type,
-    (unsigned long) dlx_jr_type,
-    (unsigned long) NULL
+    (bfd_hostptr_t) dlx_r_type,
+    (bfd_hostptr_t) dlx_load_type,
+    (bfd_hostptr_t) dlx_store_type,
+    (bfd_hostptr_t) dlx_aluI_type,
+    (bfd_hostptr_t) dlx_br_type,
+    (bfd_hostptr_t) dlx_jmp_type,
+    (bfd_hostptr_t) dlx_jr_type,
+    (bfd_hostptr_t) NULL
   };
   int dlx_insn_type_num = ((sizeof dlx_insn_type) / (sizeof (unsigned long))) - 1;
   int status =


             reply	other threads:[~2010-09-09 15:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 16:16 Pierre Muller [this message]
     [not found] <2531.82755918733$1284046069@news.gmane.org>
2010-09-09 16:32 ` Andreas Schwab
2010-09-09 19:56   ` Pierre Muller
2010-09-10 13:47     ` Nick Clifton
2010-09-10 13:57       ` Pierre Muller

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='003a01cb5033$7e045b40$7a0d11c0$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    /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