From: Michael Elizabeth Chastain <chastain@cygnus.com>
To: dan@cgsoftware.com
Cc: gdb@sources.redhat.com
Subject: Re: So what is wrong with v3 C++
Date: Thu, 28 Jun 2001 23:31:00 -0000 [thread overview]
Message-ID: <200106290532.WAA01150@bosch.cygnus.com> (raw)
Dan Berlin writes:
> 1. Template functions (names or types) have return types encoded,
> with the exceptions listed below.
Okay, we must comply with the ABI, then.
> You seem to want to get rid of return types from mangled names for
> templates. This ain't gonna ever happen. It's done on purpose, it's
> not an accident.
No, first I want to know what the spec requires. The ABI spec wants the
information to be present in the mangled name. Now follow the information
flow:
mangled name -> demangled name (demangler)
demangled name -> user visible and user matchable names (gdb)
I accept the ABI spec, and I'm comfortable with the demangler preserving
all the information including the return type.
We still have to figure out what to do if the user types:
(gdb) break add_two_values
... when add_two_values is a template.
One option is to propagate this "return type in the name" all the way
through to the user, and mention it in the documentation. So the
user really would have to type:
(gdb) break 'int add_two_values<int,int>TAB
> LD, c++filt, nm, objdump, etc all use it.
> GDB seems to *depend* on it more, but this is not a good thing. We
> depend on mangled names too much.
nm, objdump, and c++filt just use demangling in their output.
As far as I know, ld operates the same way. Does it ever demangle a name
and use the result for anything except error printing?
gdb is the only tool I know where people type in names and the tool
has to match against demangled forms.
If you are suggesting that the demangler should return a nice tree
of information, instead of gdb doing its own re-parsing, I'm in favor
of that.
> I've already rewritten the dwarf2 reader, including the scope work.
> There would be little point in JimB rewriting it again.
I saw the patch.
Do you have any test results, or plans for getting it tested?
Michael
next reply other threads:[~2001-06-28 23:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-28 23:31 Michael Elizabeth Chastain [this message]
2001-06-29 8:59 ` 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 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 18:12 Michael Elizabeth Chastain
2001-06-28 19:06 ` Daniel Berlin
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=200106290532.WAA01150@bosch.cygnus.com \
--to=chastain@cygnus.com \
--cc=dan@cgsoftware.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