public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug c++/28901] New: unable to resolve function overloads involving inheritance Date: Wed, 16 Feb 2022 23:56:06 +0000 [thread overview] Message-ID: <bug-28901-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=28901 Bug ID: 28901 Summary: unable to resolve function overloads involving inheritance Product: gdb Version: 11.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ Assignee: unassigned at sourceware dot org Reporter: msebor at gmail dot com Target Milestone: --- The following test case shows that GDB 11.1 is unable to perform basic overload resolution involving derivation. This limitation prevents, for example, calling output functions when debugging LLVM. The LLVM debugger, lldb, handles this without a problem. I'm using GNU gdb (GDB) Fedora 11.1-5.fc35. $ cat t.C && g++ -g3 t.C && gdb -batch -nx -ex "break main" -ex run -ex "print f (x, b)" a.out struct A { }; struct B: A { }; struct X { }; struct Z { }; void f (X&, A&) { } void f (Z&, B&) { } B b; X x; int main () { f (x, b); } Breakpoint 1 at 0x401128: file t.C, line 15. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, main () at t.C:15 15 f (x, b); Cannot resolve function f to any overloaded instance -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-02-16 23:56 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-16 23:56 msebor at gmail dot com [this message] 2022-02-18 17:14 ` [Bug c++/28901] " tromey at sourceware dot org 2022-02-18 21:07 ` tromey at sourceware dot org 2022-02-18 22:07 ` msebor at gmail dot com 2022-02-18 22:11 ` tromey at sourceware dot org 2022-02-18 22:19 ` msebor at gmail dot com 2022-02-19 2:24 ` tromey at sourceware dot org 2022-02-19 16:29 ` tromey at sourceware dot org 2022-02-23 20:17 ` tromey at sourceware dot org 2022-02-23 20:23 ` msebor at gmail dot com 2022-02-23 20:23 ` cvs-commit at gcc dot gnu.org 2022-02-24 21:26 ` msebor at gmail dot com 2022-03-12 22:12 ` tromey at sourceware dot org 2022-11-09 15:36 ` tromey at sourceware dot org 2022-11-10 12:19 ` blarsen at redhat dot com
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-28901-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).