This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Problems with floatformat on Alpha
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 25 Nov 2002 15:35:13 -0500
- Subject: Re: Problems with floatformat on Alpha
- References: <20021124214447.GA1222@nevyn.them.org>
I spent some time today tracking problems in Alpha/Linux testsuite results.
One of the biggies was SIGFPE in convert_floatformat_to_doublest. The first
problem was pretty easy:
else if (exponent == 0)
exponent = 1 - fmt->exp_bias;
1 is an int, exp_bias is an unsigned int, exponent is a long int. The math
is done unsigned and exponent is ridiculously large.
I'm not sending a patch yet because I can't test it; something goes wrong
later, in the call to ldexp and elsewhere, that looks suspiciously like GDB
is miscompiled.
So on alpha, sizeof(long) == 8 but sizeof(int) == 4? Suggest a comment
reminding people of this :-)
Andrew