public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "jwakely.gcc at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/28480] New: pretty printing getting confused Date: Wed, 20 Oct 2021 22:43:13 +0000 [thread overview] Message-ID: <bug-28480-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=28480 Bug ID: 28480 Summary: pretty printing getting confused Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: jwakely.gcc at gmail dot com Target Milestone: --- On fedora, with libstdc++-debuginfo installed, and either rawhide's gdb-11 or a self-built gdb-12 from git. #include <memory> #include <string> struct datum { std::string s; int i; }; int main() { std::unique_ptr<datum> uptr (new datum); uptr->s = "hi bob"; uptr->i = 23; std::unique_ptr<datum> &ruptr = uptr; } $ g++ -g cxx11.cc $ gdb ./a.out GNU gdb (GDB) Fedora 11.1-2.fc36 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./a.out... (gdb) start Temporary breakpoint 1 at 0x40118f: file cxx11.cc, line 13. Starting program: /tmp/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Temporary breakpoint 1, main () at cxx11.cc:13 13 std::unique_ptr<datum> uptr (new datum); (gdb) n 14 uptr->s = "hi bob"; (gdb) 15 uptr->i = 23; (gdb) 16 std::unique_ptr<datum> &ruptr = uptr; (gdb) p uptr $1 = std::unique_ptr<datum> = {get() = {<No data fields>}} This "<No data fields>" is wrong, it's a datum* pointer, and should be printed as such. This works with GDB 10, but not GDB 11 in rawhide or a self-built GDB 12 from git. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2021-10-20 22:43 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-20 22:43 jwakely.gcc at gmail dot com [this message] 2021-10-21 0:44 ` [Bug gdb/28480] " jwakely.gcc at gmail dot com 2021-10-21 0:49 ` jwakely.gcc at gmail dot com 2021-10-21 0:56 ` jwakely.gcc at gmail dot com 2021-10-21 3:23 ` simark at simark dot ca 2021-10-21 8:44 ` jwakely.gcc at gmail dot com 2021-10-26 19:14 ` blarsen at redhat dot com 2021-11-04 16:01 ` blarsen at redhat dot com 2021-11-04 16:52 ` jwakely.gcc at gmail dot com 2021-11-04 17:06 ` jwakely.gcc at gmail dot com 2021-11-04 17:09 ` jwakely.gcc at gmail dot com 2021-11-04 17:36 ` jwakely.gcc at gmail dot com 2021-11-04 17:42 ` jwakely.gcc at gmail dot com 2021-11-04 17:53 ` jwakely.gcc at gmail dot com 2021-11-04 17:56 ` simark at simark dot ca 2021-11-04 17:59 ` simark at simark dot ca 2021-11-04 18:07 ` blarsen at redhat dot com 2021-11-04 18:45 ` pedro at palves dot net 2021-11-04 19:40 ` blarsen at redhat dot com 2021-11-05 13:53 ` blarsen at redhat dot com 2021-11-05 14:29 ` [Bug c++/28480] Incorrect field ambiguity detection due to [[no_unique_address]] simark at simark dot ca 2021-11-25 12:56 ` cvs-commit at gcc dot gnu.org 2021-11-25 15:25 ` blarsen at redhat dot com 2021-12-11 7:49 ` cvs-commit at gcc dot gnu.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-28480-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).