public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "markjstock at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/30161] New: x/f does not print values of _Float16 Date: Fri, 24 Feb 2023 00:06:20 +0000 [thread overview] Message-ID: <bug-30161-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=30161 Bug ID: 30161 Summary: x/f does not print values of _Float16 Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: minor Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: markjstock at gmail dot com Target Milestone: --- Created attachment 14717 --> https://sourceware.org/bugzilla/attachment.cgi?id=14717&action=edit A simple dot product program that uses float and _Float16 'p'rint will successfully print the value of fp16 variables x/hf or x/f will not, it will print decimal instead (gdb) p x32[0] $1 = (__gnu_cxx::__alloc_traits<std::allocator<float>, float>::value_type &) @0x155554eed010: 0.100000001 (gdb) x/wf 0x155554eed010 0x155554eed010: 0.100000001 (gdb) p x16[0] $2 = (__gnu_cxx::__alloc_traits<std::allocator<_Float16>, _Float16>::value_type &) @0x1555552c6010: 0.099976 (gdb) x/hf 0x1555552c6010 0x1555552c6010: 11878 This is relevant to debugging rocm programs (AMD GPUs) as the "print" command under rocgdb does not not show __shared__ memory elements, and we must use 'x' to view the values of __half variables because we only have their addresses. (But that bug is AMD's.) -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-02-24 0:06 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-24 0:06 markjstock at gmail dot com [this message] 2023-02-24 0:07 ` [Bug gdb/30161] " markjstock at gmail dot com 2023-02-24 16:37 ` tromey at sourceware dot org 2023-02-24 16:39 ` tromey at sourceware dot org 2023-02-27 23:05 ` markjstock at gmail dot com 2023-02-27 23:16 ` tromey at sourceware dot org 2023-03-02 15:55 ` cvs-commit at gcc dot gnu.org 2023-03-02 15:55 ` tromey 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-30161-4717@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).