This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Cut memory address width


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]