From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19757 invoked by alias); 10 Sep 2010 14:06:29 -0000 Received: (qmail 19747 invoked by uid 22791); 10 Sep 2010 14:06:28 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Sep 2010 14:06:22 +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 o8AE6Ih8070496 for ; Fri, 10 Sep 2010 16:06:18 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms4.u-strasbg.fr [IPv6:2001:660:2402:d::13]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o8AE6INn047875 for ; Fri, 10 Sep 2010 16:06:18 +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 o8AE6ICK028507 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 10 Sep 2010 16:06:18 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFA 4/5] New patches to support --enable-targets=all for mingw64 Date: Fri, 10 Sep 2010 15:39:00 -0000 Message-ID: <003f01cb50f1$5a98e0e0$0fcaa2a0$@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/msg00222.txt.bz2 I tried to compile GDB with --enable-targets=3Dall for x86_64-w64-mingw32 target. As 'long' type is 4-byte while pointer type is 8-byte, this target is quite sensitive to so 'dirty' code lying around like casting 'long' or 'unsigned long' to pointers... I had to fix several sources to be able to=20 successfully compile GDB with those configuration options. 4) Use host_address_to_string to display host pointers. in hppa-tdep.c, monitor.c and xtensa-tdep.c Pierre Muller Pascal language support maintainer for GDB 2010-09-10 Pierre Muller * hppa-tdep.c (unwind_command): Use host_address_to_string function to display a host address. * monitor.c (monitor_read_memory): Likewise. * xtensa-tdep.c (xtensa_push_dummy_call): Likewise. Index: src/gdb/hppa-tdep.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/gdb/hppa-tdep.c,v retrieving revision 1.273 diff -u -p -r1.273 hppa-tdep.c --- src/gdb/hppa-tdep.c 19 Jan 2010 09:39:12 -0000 1.273 +++ src/gdb/hppa-tdep.c 9 Sep 2010 16:39:58 -0000 @@ -2506,7 +2506,7 @@ unwind_command (char *exp, int from_tty) return; } =20 - printf_unfiltered ("unwind_table_entry (0x%lx):\n", (unsigned long)u); + printf_unfiltered ("unwind_table_entry (%s):\n", host_address_to_string = (u)); =20 printf_unfiltered ("\tregion_start =3D %s\n", hex_string (u->region_star= t)); gdb_flush (gdb_stdout); Index: src/gdb/monitor.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/gdb/monitor.c,v retrieving revision 1.100 diff -u -p -r1.100 monitor.c --- src/gdb/monitor.c 1 Jul 2010 15:36:16 -0000 1.100 +++ src/gdb/monitor.c 9 Sep 2010 16:39:59 -0000 @@ -1835,8 +1835,9 @@ monitor_read_memory (CORE_ADDR memaddr,=20 return 0; } =20 - monitor_debug ("MON read block ta(%s) ha(%lx) %d\n", - paddress (target_gdbarch, memaddr), (long) myaddr, len); + monitor_debug ("MON read block ta(%s) ha(%s) %d\n", + paddress (target_gdbarch, memaddr), + host_address_to_string (myaddr), len); =20 if (current_monitor->flags & MO_ADDR_BITS_REMOVE) memaddr =3D gdbarch_addr_bits_remove (target_gdbarch, memaddr); @@ -1924,7 +1925,8 @@ monitor_read_memory (CORE_ADDR memaddr,=20 p +=3D strlen (current_monitor->getmem.resp_delim); #endif } - monitor_debug ("MON scanning %d ,%lx '%s'\n", len, (long) p, p); + monitor_debug ("MON scanning %d ,%s '%s'\n", len, + host_address_to_string (p), p); if (current_monitor->flags & MO_GETMEM_16_BOUNDARY) { char c; Index: src/gdb/xtensa-tdep.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/gdb/xtensa-tdep.c,v retrieving revision 1.44 diff -u -p -r1.44 xtensa-tdep.c --- src/gdb/xtensa-tdep.c 18 Aug 2010 19:13:33 -0000 1.44 +++ src/gdb/xtensa-tdep.c 9 Sep 2010 16:40:00 -0000 @@ -1636,8 +1636,9 @@ xtensa_push_dummy_call (struct gdbarch * { struct value *arg =3D args[i]; struct type *arg_type =3D check_typedef (value_type (arg)); - fprintf_unfiltered (gdb_stdlog, "%2d: 0x%lx %3d ", - i, (unsigned long) arg, TYPE_LENGTH (arg_type)); + fprintf_unfiltered (gdb_stdlog, "%2d: %s %3d ", i, + host_address_to_string (arg), + TYPE_LENGTH (arg_type)); switch (TYPE_CODE (arg_type)) { case TYPE_CODE_INT: @@ -1650,8 +1651,8 @@ xtensa_push_dummy_call (struct gdbarch * fprintf_unfiltered (gdb_stdlog, "%3d", TYPE_CODE (arg_type)); break; } - fprintf_unfiltered (gdb_stdlog, " 0x%lx\n", - (unsigned long) value_contents (arg)); + fprintf_unfiltered (gdb_stdlog, " %s\n", + host_address_to_string (value_contents (arg))); } } =20