[RFA/mips] Fix crash trying to print long double float

Andrew Cagney cagney@gnu.org
Fri Aug 6 20:24:00 GMT 2004


> Because the gdbarch vector tells GDB that TARGET_LONG_DOUBLE_BIT = 64bit,
> we end up returning a NULL floatformat. And unfortunately for us, we
> immediatly use that NULL floatformat to feed it to floatformat_is_valid(),
> which dereferences it without checking that it's not NULL before hand.
> This causes the SEGV.  See values.c:unpack_double():
> 
>         if (!floatformat_is_valid (floatformat_from_type (type), valaddr))
>           {
>             *invp = 1;
>             return 0.0;
>           }

Does the attached stop the crash?

Andrew

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040806/0589a1a6/attachment.ksh>


More information about the Gdb-patches mailing list