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: msnyder 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 14:42:22 +1000
- CC: James Wilson <wilson at cygnus dot com>, Jim Blandy <jimb at cygnus dot com>, ezannoni at cygnus dot com, gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200006200213.TAA22932@wilson.cygnus.com> <395013E2.D78A2EE2@cygnus.com> <395037E9.73C3@cygnus.com>
Michael Snyder wrote:
>
> Andrew Cagney wrote:
>
> > LONGEST is C's equivalent to ``long'' the longest type and can fit a
> > CORE_ADDR.
> Hmmm, no, LONGEST has nothing to do with a CORE_ADDR.
> LONGEST is the largest integer type available in the compiler.
well:
sizeof (CORE_ADDR) >= TARGET_PTR_BIT / HOST_CHAR_BIT
sizeof (LONGEST) >= TARGET_LONG_LONG_BIT / HOST_CHAR_BIT
CORE_ADDR is a host integer type large enough to hold
a canonical target address
LONGEST is the largest host integer type supported by the host
giving:
sizeof (LONGEST) >= sizeof (CORE_ADDR) :-)
Much code (unfortunatly?) assumes that a CORE_ADDR can be passed into a
LONGEST (whether doing so is correct or not).
Andrew