This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: gdb patch for 64-bit enum values on 64-bit hosts (ia64-linux)


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

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