This is the mail archive of the
mailing list for the GDB project.
Re: CORE_ADDR representation
- From: Stan Shebs <stan at codesourcery dot com>
- To: gdb at sourceware dot org
- Date: Wed, 17 Feb 2010 21:41:51 -0800
- Subject: Re: CORE_ADDR representation
- References: <20100218044416.GA19485@caradoc.them.org>
Daniel Jacobowitz wrote:
This comes up again and again, and has at least three times in theUrgh. On the plus side, the months of busywork lets us avoid dealing
with the brain-strainingly hard problems. :-)
past month with Jan's PIE patches. Is it time for us to have opaque
arithmetic on target addresses?
Heh, I remember getting hosed that way by a MIPS in 1994...
This truncates the high bits. MIPS sign-extends pointers, even
internally in CORE_ADDR, and this results in separate debug info files
for MIPS executables being relocated off to la-la land.
For instance, should we always internally sign-extend CORE_ADDR?I would say to declare that CORE_ADDR is fundamentally 0..memtop, so it
should be unsigned and zero-extend.
Always internally zero-extend? Having it vary by target has been a
Can unsigned->signed->diddle->unsigned be encapsulated for MIPS only?