public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15567] New: pty of derived class w/ using base::method doesn't print base::method
@ 2013-06-03 22:29 dje at google dot com
2013-06-03 22:32 ` [Bug c++/15567] " dje at google dot com
2013-06-03 23:11 ` dje at google dot com
0 siblings, 2 replies; 3+ messages in thread
From: dje at google dot com @ 2013-06-03 22:29 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15567
Bug ID: 15567
Summary: pty of derived class w/ using base::method doesn't
print base::method
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: dje at google dot com
Seems like I should be able to tell from that output of "pty derived" that
"p d->foo (0)" will invoke base's foo and not derived's foo,
without having to look at the source to see the "using".
[Note: Due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57519
compiling this may not produce the expected dwarf.
Attached is a hacked copy.]
class base
{
public:
int foo (int x) { return x; }
};
class derived : base
{
public:
using base::foo;
double foo (double x) { return x; }
};
int
main ()
{
derived *d = new derived;
return d->foo (0);
}
(gdb) start
(gdb) pty d
type = class derived : private base {
public:
double foo(double);
} *
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/15567] pty of derived class w/ using base::method doesn't print base::method
2013-06-03 22:29 [Bug c++/15567] New: pty of derived class w/ using base::method doesn't print base::method dje at google dot com
@ 2013-06-03 22:32 ` dje at google dot com
2013-06-03 23:11 ` dje at google dot com
1 sibling, 0 replies; 3+ messages in thread
From: dje at google dot com @ 2013-06-03 22:32 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15567
--- Comment #1 from dje at google dot com ---
Created attachment 7055
--> http://sourceware.org/bugzilla/attachment.cgi?id=7055&action=edit
assembler repro
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/15567] pty of derived class w/ using base::method doesn't print base::method
2013-06-03 22:29 [Bug c++/15567] New: pty of derived class w/ using base::method doesn't print base::method dje at google dot com
2013-06-03 22:32 ` [Bug c++/15567] " dje at google dot com
@ 2013-06-03 23:11 ` dje at google dot com
1 sibling, 0 replies; 3+ messages in thread
From: dje at google dot com @ 2013-06-03 23:11 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15567
--- Comment #2 from dje at google dot com ---
There's the additional bug that "p d->foo (0)" tries to invoke the wrong
method.
gdb looks for "double foo (double)" and never tries "int foo (int)".
[I'm setting aside the absence of the return type in the search parameters.]
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-03 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 22:29 [Bug c++/15567] New: pty of derived class w/ using base::method doesn't print base::method dje at google dot com
2013-06-03 22:32 ` [Bug c++/15567] " dje at google dot com
2013-06-03 23:11 ` dje at google 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).