From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23647 invoked by alias); 9 Sep 2010 15:27:29 -0000 Received: (qmail 23365 invoked by uid 22791); 9 Sep 2010 15:27:27 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,TW_DL X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Sep 2010 15:27:20 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [IPv6:2001:660:2402::186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o89FRG3B065719 ; Thu, 9 Sep 2010 17:27:17 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms5.u-strasbg.fr [IPv6:2001:660:2402:d::14]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o89FRGVU088100 ; Thu, 9 Sep 2010 17:27:16 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o89FRFkh060454 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 9 Sep 2010 17:27:16 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: , 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 Message-ID: <003a01cb5033$7e045b40$7a0d11c0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00201.txt.bz2 '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=20 pointer. I tested the patch below by compilation=20 with --enable-targets=3Dall 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 * dlx-dis.c (print_insn_dlx): Use bfd_hostptr_t type for dlx_insn_type array. Index: src/opcodes/dlx-dis.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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=20 bfd_byte buffer[4]; int insn_idx; unsigned long insn_word; - unsigned long dlx_insn_type[] =3D + bfd_hostptr_t dlx_insn_type[] =3D { - (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 =3D ((sizeof dlx_insn_type) / (sizeof (unsigned lo= ng))) - 1; int status =3D