From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14066 invoked by alias); 27 Jun 2013 08:19:56 -0000 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 Received: (qmail 14055 invoked by uid 89); 27 Jun 2013 08:19:55 -0000 X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from mail-db8lp0189.outbound.messaging.microsoft.com (HELO db8outboundpool.messaging.microsoft.com) (213.199.154.189) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 08:19:54 +0000 Received: from mail133-db8-R.bigfish.com (10.174.8.225) by DB8EHSOBE015.bigfish.com (10.174.4.78) with Microsoft SMTP Server id 14.1.225.23; Thu, 27 Jun 2013 08:19:51 +0000 Received: from mail133-db8 (localhost [127.0.0.1]) by mail133-db8-R.bigfish.com (Postfix) with ESMTP id 815763E0327; Thu, 27 Jun 2013 08:19:51 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190;KIP:(null);UIP:(null);IPV:NLI;H:mail.freescale.net;RD:none;EFVD:NLI X-SpamScore: -1 X-BigFish: VS-1(zz936eI154dIzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz177df4h17326ah8275bh8275dhz2dh2a8h668h839h8e2h8e3h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1dfeh1dffh1e1dhbe9i1155h) Received: from mail133-db8 (localhost.localdomain [127.0.0.1]) by mail133-db8 (MessageSwitch) id 1372321189870527_3522; Thu, 27 Jun 2013 08:19:49 +0000 (UTC) Received: from DB8EHSMHS005.bigfish.com (unknown [10.174.8.228]) by mail133-db8.bigfish.com (Postfix) with ESMTP id D0F4742024B; Thu, 27 Jun 2013 08:19:49 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB8EHSMHS005.bigfish.com (10.174.4.15) with Microsoft SMTP Server (TLS) id 14.16.227.3; Thu, 27 Jun 2013 08:19:33 +0000 Received: from 039-SN1MPN1-001.039d.mgd.msft.net ([169.254.1.74]) by 039-SN1MMR1-001.039d.mgd.msft.net ([10.84.1.13]) with mapi id 14.02.0328.011; Thu, 27 Jun 2013 08:19:20 +0000 From: Udma Catalin-Dan-B32721 To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: RE: gdb 7.6: Fix info mem command for 32 bits host/64 bits target Date: Thu, 27 Jun 2013 08:42:00 -0000 Message-ID: References: <51CB116D.7060009@redhat.com> In-Reply-To: <51CB116D.7060009@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-SW-Source: 2013-06/txt/msg00806.txt.bz2 Hi, Re-sending the patch including: bug entry, changeLog and the patch. Regards, Catalin Bug entry: http://sourceware.org/bugzilla/show_bug.cgi?id=3D15684=20 gdb/ChangeLog: 2013-06-26 Catalin Udma * memattr.c (mem_info_command): Fix info mem command for 32 bits host/64 bits target by removing incorrect cast Patch: Subject: [PATCH] Fix info mem command for 32 bits host/64 bits target When running gdb on 32 bits host for 64 bits target, info mem command truncates the target address to 32 bits, like in the example below (gdb) set architecture powerpc:common64=20 (gdb) mem 0x100000000 0x200000000 rw (gdb) info mem 1 y 0x0000000000000000 0x0000000000000000 rw nocache=20 Signed-off-by: Catalin Udma --- --- gdb/memattr.c.orig 2013-06-27 17:28:20.000000000 +0300 +++ gdb/memattr.c 2013-06-27 17:29:16.000000000 +0300 @@ -447,9 +447,9 @@ m->number, m->enabled_p ? 'y' : 'n'); if (gdbarch_addr_bit (target_gdbarch ()) <=3D 32) - tmp =3D hex_string_custom ((unsigned long) m->lo, 8); + tmp =3D hex_string_custom (m->lo, 8); else - tmp =3D hex_string_custom ((unsigned long) m->lo, 16); + tmp =3D hex_string_custom (m->lo, 16); =20=20=20=20=20=20=20 printf_filtered ("%s ", tmp); =20 @@ -458,14 +458,14 @@ if (m->hi =3D=3D 0) tmp =3D "0x100000000"; else - tmp =3D hex_string_custom ((unsigned long) m->hi, 8); + tmp =3D hex_string_custom (m->hi, 8); } else { if (m->hi =3D=3D 0) tmp =3D "0x10000000000000000"; else - tmp =3D hex_string_custom ((unsigned long) m->hi, 16); + tmp =3D hex_string_custom (m->hi, 16); } =20 printf_filtered ("%s ", tmp);