From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: float host/target confusion in `f' format Date: Wed, 12 Sep 2001 11:09:00 -0000 Message-id: <3B9FA4C9.A4FF3E98@cygnus.com> References: <20010912044554.C94035E9D8@zwingli.cygnus.com> X-SW-Source: 2001-09/msg00164.html Jim Blandy wrote: > > Does this look like the right thing to do? (I hate floating point types.) Looks right to me... > > 2001-09-11 Jim Blandy > > * 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. > > 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 04:22:02 > *************** > *** 455,463 **** > 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,463 ---- > 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; > print_floating (valaddr, type, stream); > break;