From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA2363858431; Wed, 16 Feb 2022 23:56:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA2363858431 From: "msebor at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor 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, 16 Feb 2022 23:56:06 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28901 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 over= load resolution involving derivation. This limitation prevents, for example, calling output functions when debugging LLVM. The LLVM debugger, lldb, han= dles 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 "pr= int f (x, b)" a.out=20 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 --=20 You are receiving this mail because: You are on the CC list for the bug.=