public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug cli/16242] print format for hex float Date: Thu, 10 Mar 2022 20:37:05 +0000 [thread overview] Message-ID: <bug-16242-4717-jiR9TZEEIV@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-16242-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=16242 --- Comment #17 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=56262a931b7ca8ee3ec9104bc7e9e0b40cf3d64e commit 56262a931b7ca8ee3ec9104bc7e9e0b40cf3d64e Author: Tom Tromey <tromey@adacore.com> Date: Thu Feb 17 13:43:59 2022 -0700 Change how "print/x" displays floating-point value Currently, "print/x" will display a floating-point value by first casting it to an integer type. This yields weird results like: (gdb) print/x 1.5 $1 = 0x1 This has confused users multiple times -- see PR gdb/16242, where there are several dups. I've also seen some confusion from this internally at AdaCore. The manual says: 'x' Regard the bits of the value as an integer, and print the integer in hexadecimal. ... which seems more useful. So, perhaps what happened is that this was incorrectly implemented (or maybe correctly implemented and then regressed, as there don't seem to be any tests). This patch fixes the bug. There was a previous discussion where we agreed to preserve the old behavior: https://sourceware.org/legacy-ml/gdb-patches/2017-06/msg00314.html However, I think it makes more sense to follow the manual. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16242 -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-03-10 20:37 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-25 18:49 [Bug cli/16242] New: " schwab@linux-m68k.org 2020-06-06 14:58 ` [Bug cli/16242] " tromey at sourceware dot org 2020-06-06 14:58 ` tromey at sourceware dot org 2020-06-06 14:59 ` tromey at sourceware dot org 2020-06-06 14:59 ` tromey at sourceware dot org 2020-06-06 16:02 ` schwab@linux-m68k.org 2020-06-07 16:35 ` tromey at sourceware dot org 2020-06-07 17:32 ` b7.10110111 at gmail dot com 2020-06-07 17:49 ` tromey at sourceware dot org 2022-02-17 18:49 ` tromey at sourceware dot org 2022-02-17 18:57 ` tromey at sourceware dot org 2022-02-17 20:15 ` tromey at sourceware dot org 2022-02-17 21:30 ` tromey at sourceware dot org 2022-02-18 16:53 ` tromey at sourceware dot org 2022-03-10 20:37 ` cvs-commit at gcc dot gnu.org [this message] 2022-03-10 20:38 ` tromey at sourceware dot org 2022-03-10 20:49 ` schwab@linux-m68k.org 2022-03-13 4:37 ` brobecker at gnat dot com 2022-05-07 15:38 ` tromey at sourceware dot org 2022-06-02 11:25 ` nchatz314 at gmail dot com 2023-08-31 16:47 ` tromey at sourceware dot org 2024-01-12 19:51 ` ssbssa at sourceware dot org
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=bug-16242-4717-jiR9TZEEIV@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).