From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Andrew Burgess <aburgess@redhat.com>,
Tom Tromey <tromey@adacore.com>,
Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Change how "print/x" displays floating-point value
Date: Thu, 10 Mar 2022 10:30:05 -0700 [thread overview]
Message-ID: <87czitogv6.fsf@tromey.com> (raw)
In-Reply-To: <87zgmovzr9.fsf@igel.home> (Andreas Schwab's message of "Fri, 18 Feb 2022 18:41:14 +0100")
>>>>> "Andreas" == Andreas Schwab <schwab@linux-m68k.org> writes:
>> +print
>> + Printing of floating-point values with base-modifying formats like
>> + /x has been changed to display the underlying bytes of the value in
>> + the desired base. This was GDB's documented behavior, but was never
>> + implemented correctly.
Andreas> How does that handle padding?
I don't know, can you say more?
>> + # See PR gdb/16242 for this.
>> + gdb_test "print/d 1.5f" " = 1069547520"
>> + gdb_test "print/u 1.5f" " = 1069547520"
>> + gdb_test "print/x 1.5f" " = 0x3fc00000"
>> + gdb_test "print/t 1.5f" " = 111111110000000000000000000000"
>> + gdb_test "print/o 1.5f" " = 07760000000"
Andreas> That assumes a particular representation of the float type that depends
Andreas> on the target.
Yeah. I don't know what targets this will fail for. I could restrict
it to x86 or skip it on some, if I knew which ones mattered.
Tom
next prev parent reply other threads:[~2022-03-10 17:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 21:29 Tom Tromey via Gdb-patches
2022-02-17 23:17 ` Andrew Burgess via Gdb-patches
2022-02-18 16:44 ` Tom Tromey via Gdb-patches
2022-02-18 17:02 ` Eli Zaretskii via Gdb-patches
2022-03-10 17:27 ` Tom Tromey via Gdb-patches
2022-03-10 17:54 ` Eli Zaretskii via Gdb-patches
2022-03-10 19:19 ` Tom Tromey via Gdb-patches
2022-02-18 17:41 ` Andreas Schwab
2022-02-19 10:05 ` Andrew Burgess via Gdb-patches
2022-03-10 17:30 ` Tom Tromey via Gdb-patches
2022-03-10 17:30 ` Tom Tromey via Gdb-patches [this message]
2022-03-10 18:23 ` Andreas Schwab
2022-03-10 20:39 ` Tom Tromey via Gdb-patches
2022-03-10 20:53 ` Andreas Schwab
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=87czitogv6.fsf@tromey.com \
--to=gdb-patches@sourceware.org \
--cc=aburgess@redhat.com \
--cc=schwab@linux-m68k.org \
--cc=tromey@adacore.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