From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31324 invoked by alias); 27 Sep 2006 18:55:52 -0000 Received: (qmail 31313 invoked by uid 22791); 27 Sep 2006 18:55:51 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 27 Sep 2006 18:55:48 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GSeZM-0001nb-Qx; Wed, 27 Sep 2006 14:55:44 -0400 Date: Wed, 27 Sep 2006 18:55:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: Michael Snyder , gdb-patches@sourceware.org Subject: Re: [patch] Cut memory address width Message-ID: <20060927185544.GA6821@nevyn.them.org> Mail-Followup-To: Jan Kratochvil , Michael Snyder , gdb-patches@sourceware.org References: <20060927161501.GA23340@host0.dyn.jankratochvil.net> <1159381222.9768.43.camel@localhost.localdomain> <20060927182211.GB5635@nevyn.them.org> <20060927183716.GA13279@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060927183716.GA13279@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00197.txt.bz2 On Wed, Sep 27, 2006 at 08:37:16PM +0200, Jan Kratochvil wrote: > In such case `paddress' should print full 64-bit addresses. > Currently it is weird as it refuses to access memory while it will show you > that you were accessing 0xffffce70 - the already cut form - it lies. Yes, I'm inclined to agree with this. I've encountered it a time or two, mostly while working on MIPS64, and it's really bewildering! If we have garbage in the high bits, that's a problem already. I don't know what else would break but unless someone else does, I think we should change paddress to print what it's got. One caveat: if addresses are supposed to be sign extended, we should not print out 64-bit addresses for a 32-bit target just because they're sign extended. This will show up on MIPS, which sign extends addresses. > If you type on i386 gdb that you want to `x/x 0xffffffffffffce70' it works - as > it will cut the address automatically as even the native C compiler would do. Probably because it's casting it to a 32-bit LONGEST somewhere. I bet it breaks if you use --enable-64-bit-bfd. -- Daniel Jacobowitz CodeSourcery