Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: float host/target confusion in `f' format
Date: Wed, 12 Sep 2001 12:28:00 -0000	[thread overview]
Message-ID: <np1ylcfbsd.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <3B9FAEA8.2070207@cygnus.com>

> should a long double test added?

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;
  


  reply	other threads:[~2001-09-12 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-11 21:44 Jim Blandy
2001-09-12 11:09 ` Michael Snyder
2001-09-12 11:51 ` Andrew Cagney
2001-09-12 12:28   ` Jim Blandy [this message]
2001-12-07 13:09     ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=np1ylcfbsd.fsf@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox