public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28901] New: unable to resolve function overloads involving inheritance
@ 2022-02-16 23:56 msebor at gmail dot com
  2022-02-18 17:14 ` [Bug c++/28901] " tromey at sourceware dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: msebor at gmail dot com @ 2022-02-16 23:56 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-11-10 12:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 23:56 [Bug c++/28901] New: unable to resolve function overloads involving inheritance msebor at gmail dot com
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

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).