From f4697836921014a6a3a39f9fbcbfe707e62f4a98 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 7 Dec 2001 21:07:59 +0000 Subject: [PATCH] * 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'. --- gdb/ChangeLog | 6 ++++++ gdb/printcmd.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9acd44a037d..b29b15df378 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-12-07 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. Add support for `long double'. + 2001-12-07 Martin M. Hunt * configure.in: Check for sys/filio.h diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 2486ba7fa95..bb02d8d42ee 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -455,10 +455,12 @@ print_scalar_formatted (char *valaddr, struct type *type, int format, int size, break; case 'f': - if (len == sizeof (float)) + if (len == TYPE_LENGTH (builtin_type_float)) type = builtin_type_float; - else if (len == sizeof (double)) + 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; -- 2.30.2