From: Michael Elizabeth Chastain <chastain@cygnus.com>
To: ac131313@cygnus.com, gdb@sources.redhat.com
Subject: Re: So what is wrong with v3 C++
Date: Thu, 28 Jun 2001 18:12:00 -0000 [thread overview]
Message-ID: <200106290112.SAA29748@stanley.cygnus.com> (raw)
Here are the open PR's:
gdb/7 cout << 1 doesn't work for c++
gdb/18 gdb can't parse "info func operator*" or "info func operator\*"
gdb/19 gdb v3 demangler fails on hairyfunc5 hairyfunc6 hairyfunc7
gdb/27 ptype shows duplicate constructors and destructors
gdb/33 name matching on template names is sensitive to white space
gdb/34 g++ v3 functions show as "inheritance2() ()"
gdb/39 C++ constructors show bogus return type
gdb/40 C++ template functions have return types in their names
gdb/41 testsuite/gdb.c++/demangle.exp needs v3 coverage
gdb/57 nested classes incorrectly printing
gdb/59 static members in a base class confuse gdb
gdb/60 GDB has problems with C++ symbols
As I've talked about with JimB, PR gdb/27 requires new design in gdb.
The issue is that gcc takes one source function (a constructor or a
destructor) and emits two or three object code functions for it. This
is new in g++ v3, and as far as I know, gdb has never had machinery to
handle anything like this. All the rest of the PR's are simply bugs.
Some of the template stuff and namespace stuff may require new design.
Probably every case that is broken in v3 was already broken in v2.
Pointers-to-members probably don't work. There is a test script
gdb.c++/member-ptr.exp that is disabled with the following comment:
# Nearly all of these tests fail when compiled with G++, so just give up
# until GDB gets enhanced. -sts 1999-06-22
Here are the bugs that I haven't filed PR's on yet. I'll just bite the
bullet and file some PR's tonight.
function call with reference parameter
fails in gdb.c++/classes.exp
fails in both v2.95.3 and v3pre
When the test script calls a function by hand, and the function
has a reference parameter, the inferior program gets a SIGSEGV.
user accesses ambiguous base
fails in gdb.c++/inherit.exp
fails in both v2.95.3 and v3pre
The program under test has a non-virtual base class which appears
several times (B:A and C:A and D:B,C so D has two A's). The debugger
when the user references a member such as "d::a", gdb should say
that this is ambiguous. Instead, gdb uses the first one that it
finds.
gdb value for some arguments at beginning of function
fails in gdb.c++/overload.exp
passes in v2.95.3, fails in v3pre
Argument values are incorrect when calling a function with an
arg of type short, unsigned short, long, or unsigned long.
user sets breakpoint on template class ctor/dtor
fails in gdb.c++/templates.exp
results lost for v.29.3, fails in v3pre
The test script attempts to set breakpoints on "T5<int>::T5"
and "T5<int>::~T5". gdb fails to find these functions.
> My second question. How many of these bugs can be fixed without
> rewriting the dwarf2 reader? My understanding is that both the virtual
> functions and the thunks bugs can.
I think so too. There's a big issue with finding and using the virtual
base pointers properly. As I understand it, Jim's going to rewrite this
code. Then if the code has problems, we will:
. check the assembly code of the program-under-test against the
Intel spec. If the assembly code does not conform, file an
upstream PR against gcc.
. if the assembly code does conform, debug the new v3 code that
implements stuff like baseclass_offset.
Another way to look it: I don't think any of the *new* v3 bugs are in
the dwarf2 reader.
Michael
next reply other threads:[~2001-06-28 18:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-28 18:12 Michael Elizabeth Chastain [this message]
2001-06-28 19:06 ` Daniel Berlin
-- strict thread matches above, loose matches on Subject: below --
2001-07-02 14:54 Benjamin Kosnik
2001-06-29 11:57 Benjamin Kosnik
2001-07-02 20:28 ` Per Bothner
2001-06-29 10:28 Michael Elizabeth Chastain
2001-06-29 11:40 ` Daniel Berlin
2001-06-29 0:56 Michael Elizabeth Chastain
2001-06-28 23:50 Michael Elizabeth Chastain
2001-06-29 8:59 ` Daniel Berlin
2001-06-28 23:31 Michael Elizabeth Chastain
2001-06-29 8:59 ` Daniel Berlin
2001-06-28 20:42 Michael Elizabeth Chastain
2001-06-28 20:44 ` Christopher Faylor
2001-06-28 23:10 ` Daniel Berlin
2001-06-28 23:08 ` Daniel Berlin
2001-06-29 0:29 ` Tom Tromey
2001-06-28 16:28 Andrew Cagney
2001-06-28 18:59 ` Daniel Berlin
2001-06-29 13:40 ` Jim Blandy
2001-06-29 23:15 ` Daniel Berlin
2001-06-30 10:06 ` Jim Blandy
2001-06-30 12:30 ` Daniel Berlin
2001-07-02 9:01 ` Jim Blandy
2001-07-04 9:22 ` Andrew Cagney
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=200106290112.SAA29748@stanley.cygnus.com \
--to=chastain@cygnus.com \
--cc=ac131313@cygnus.com \
--cc=gdb@sources.redhat.com \
/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: link
Be 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