This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb patch for 64-bit enum values on 64-bit hosts (ia64-linux)
- To: James Wilson <wilson at cygnus dot com>
- Subject: Re: gdb patch for 64-bit enum values on 64-bit hosts (ia64-linux)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 21 Jun 2000 11:01:22 +1000
- CC: Jim Blandy <jimb at cygnus dot com>, elena at cygnus dot com, gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200006200213.TAA22932@wilson.cygnus.com>
James Wilson wrote:
>
> Um, again, shouldn't this be LONGEST?
>
> What is LONGEST, what are the rules for its use, and what are the implications
> of trying to use it?
CORE_ADDR is a type that can fit a target address. On the MIPS it is a
@($&(*#&$ sign extended value :-)
LONGEST is C's equivalent to ``long'' the longest type and can fit a
CORE_ADDR.
> I am aware that my patches aren't going to work for cross debuggers from
> 32-bit hosts to 64-bit targets, but right now I'm not worried about that.
> I need to get the native 64-bit debugger working correctly, and I don't have
> time at the moment to worry about the cross debugger case.
If they used LONGEST or CORE_ADDR then they would fix that case. (I'm
not sure if LONGEST or CORE_ADDR is PC - what is the type of (char*)a -
(char*b)?)
The main implication is that LONGEST and CORE_ADDR can't be printed
using *printf*. Instead paddr*() and phex*() need to be used.
This is really a question for GDB - Jim and Elena. Jim, you've
identified where the types are wrong the maintainers need to decide the
best way to correctly fix them.
Andrew