This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: float host/target confusion in `f' format
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 07 Dec 2001 16:10:25 -0500
- Subject: Re: RFA: float host/target confusion in `f' format
- References: <20010912044554.C94035E9D8@zwingli.cygnus.com><3B9FAEA8.2070207@cygnus.com> <np1ylcfbsd.fsf@zwingli.cygnus.com>
I've committed this patch.
Jim Blandy <jimb@cygnus.com> writes:
> 2001-09-11 Jim Blandy <jimb@redhat.com>
>
> * printcmd.c (print_scalar_formatted): Compare the length of the
> value against the lengths of the target's floating-point types,
> not the host's. Add support for `long double'.
>
> Index: gdb/printcmd.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/printcmd.c,v
> retrieving revision 1.27
> diff -c -r1.27 printcmd.c
> *** gdb/printcmd.c 2001/09/12 04:18:08 1.27
> --- gdb/printcmd.c 2001/09/12 19:26:35
> ***************
> *** 455,464 ****
> break;
>
> case 'f':
> ! if (len == sizeof (float))
> type = builtin_type_float;
> ! else if (len == sizeof (double))
> type = builtin_type_double;
> print_floating (valaddr, type, stream);
> break;
>
> --- 455,466 ----
> break;
>
> case 'f':
> ! if (len == TYPE_LENGTH (builtin_type_float))
> type = builtin_type_float;
> ! else if (len == TYPE_LENGTH (builtin_type_double))
> type = builtin_type_double;
> + else if (len == TYPE_LENGTH (builtin_type_long_double))
> + type = builtin_type_long_double;
> print_floating (valaddr, type, stream);
> break;
>
>