This is the mail archive of the gdb@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: CORE_ADDR representation


Daniel Jacobowitz wrote:
This comes up again and again, and has at least three times in the
past month with Jan's PIE patches. Is it time for us to have opaque
arithmetic on target addresses?
Urgh. On the plus side, the months of busywork lets us avoid dealing with the brain-strainingly hard problems. :-)
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.
Heh, I remember getting hosed that way by a MIPS in 1994...

For instance, should we always internally sign-extend CORE_ADDR?
Always internally zero-extend? Having it vary by target has been a
recurring problem.
I would say to declare that CORE_ADDR is fundamentally 0..memtop, so it should be unsigned and zero-extend.

Can unsigned->signed->diddle->unsigned be encapsulated for MIPS only?

Stan


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