From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Discussion <gdb@sources.redhat.com>
Subject: So what is wrong with v3 C++
Date: Thu, 28 Jun 2001 16:28:00 -0000 [thread overview]
Message-ID: <3B3BBD90.8070601@cygnus.com> (raw)
So,
[Perhaphs I should write a book about how I'm a reformed C++ programmer
... :-)]
At the risk of ``playing manager'', I'd like to try to understand
exactly what the problems with GDB v3.0 are. If nothing else, I, or
someone else, will need to document these as known bugs in the 5.1
release notes. Further, since C++ no longer has a maintainer, I think
that now is probably a good time to take stock.
Anyway, to this end, I had a face to face discussion with Jim Blandy
(Don and a few others were present and were contibuting, unfortunatly,
neither DanB nor Michael C were around).
In that discussion, my attention was drawn to the following v3 C++ problems:
> - Dwarf 2 reader: fix constructor stuff
> ( http://sources.redhat.com/ml/gdb/2001-06/msg00096.html )
While this has been discussed to death and causes many many failures and
a fix involves changes to the dwarf2 reader. I'm left wondering if:
o it really needs a dwarf2 rewrite
o compared to some of the other
bugs, it is really that urgent
Personally, I'd be more worried about being able to single step and
print variables correctly.
> - Virtual base classes, and their virtual functions
This, I understand is more serious. GDB does need to be able to print
out virtual base classes, their functions and so on. I understand that,
at present, it prints out bogus information.
Going by what Jim indicated, though, this in theory just involves more
foot leather - finding the time to fill in the missing cases. I suspect
that who ever does do this will need very thick soles on their shoes.
> - Skipping vtable thunks, if necessary
I don't know if this was ever discussed on this list. As I understand
it, v3 virtual function is sometimes called via a ``thunk''. A
``thunk'' pulls a rabbit out of a hat (finds the correct object to pass
to the real function) and then passes control to the real function.
At present, if GDB stepped into a thunk it would find no line info,
treat it like a library and just skip it - oops, step into virtual
functions via thunks doesn't work.
One proposed solution is to mimic / generalize the shared library
mechanism so that GDB will single step through it to the real function.
I think this bug is pretty serious since, GDB will, randomly loose
control over the target. I certainly think it is more serious than the
constructor problem.
> - Breakpoint work?
This one I don't remember. There was a question if, given an arbitrary
C++ expression, GDB could find and set a breakpoint on the correct function.
> - decode_line_1
This one has been discussed to death. The current decode_line_1 is
un-maintainable. However, people, are largely living with it.
So my first question. Are there any other serious v3 bugs? MichaelC,
you're probably most familar with the testsuite and what it is reporting
as broken.
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.
enjoy,
Andrew
next reply other threads:[~2001-06-28 16:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-28 16:28 Andrew Cagney [this message]
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
2001-06-28 18:12 Michael Elizabeth Chastain
2001-06-28 19:06 ` 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 23:31 Michael Elizabeth Chastain
2001-06-29 8:59 ` Daniel Berlin
2001-06-28 23:50 Michael Elizabeth Chastain
2001-06-29 8:59 ` Daniel Berlin
2001-06-29 0:56 Michael Elizabeth Chastain
2001-06-29 10:28 Michael Elizabeth Chastain
2001-06-29 11:40 ` Daniel Berlin
2001-06-29 11:57 Benjamin Kosnik
2001-07-02 20:28 ` Per Bothner
2001-07-02 14:54 Benjamin Kosnik
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=3B3BBD90.8070601@cygnus.com \
--to=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