From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7FBDA393EC3C; Wed, 13 May 2020 09:51:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FBDA393EC3C From: "ubizjak at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug tui/25983] New: Hex float display of floating-point values Date: Wed, 13 May 2020 09:51:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tui X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 09:51:04 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25983 Bug ID: 25983 Summary: Hex float display of floating-point values Product: gdb Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: tui Assignee: unassigned at sourceware dot org Reporter: ubizjak at gmail dot com Target Milestone: --- (gdb) p $xmm0 $2 =3D {v4_float =3D {-2.5, 2.5, 0, 0}, v2_double =3D {8.0000057257711887, = 0}, v16_int8 =3D {0, 0, 32, -64, 0, 0, 32, 64, 0, 0, 0, 0, 0, 0, 0, 0}, v8_int1= 6 =3D {0, -16352, 0, 16416, 0, 0, 0, 0}, v4_int32 =3D {-1071644672, 1075838976, 0= , 0}, v2_int64 =3D {4620693220905451520, 0}, uint128 =3D 4620693220905451520} (gdb) p/x $xmm0 $3 =3D {v4_float =3D {0xfffffffe, 0x2, 0x0, 0x0}, v2_double =3D {0x8, 0x0},= v16_int8 =3D {0x0, 0x0, 0x20, 0xc0, 0x0, 0x0, 0x20, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0= x0, 0x0, 0x0}, v8_int16 =3D {0x0, 0xc020, 0x0, 0x4020, 0x0, 0x0, 0x0, 0x0}, v4_= int32 =3D {0xc0200000, 0x40200000, 0x0, 0x0}, v2_int64 =3D {0x40200000c0200000, 0= x0}, uint128 =3D 0x40200000c0200000} It would be nice to print floats in hex notation [1,2], the current display= of v4_float with /x is less than useful, it displays integer part in hex. (gdb) i r xmm0 exposes the same inconsistency. [1] https://www.exploringbinary.com/hexadecimal-floating-point-constants/ [2] https://gcc.gnu.org/onlinedocs/gcc/Hex-Floats.html --=20 You are receiving this mail because: You are on the CC list for the bug.=