From: Daniel Berlin <dan@cgsoftware.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: Daniel Berlin <dan@cgsoftware.com>,
GDB Discussion <gdb@sources.redhat.com>
Subject: Re: So what is wrong with v3 C++
Date: Sat, 30 Jun 2001 12:30:00 -0000 [thread overview]
Message-ID: <87lmm9n4t6.fsf@cgsoftware.com> (raw)
In-Reply-To: <np3d8hsxoz.fsf@zwingli.cygnus.com>
Jim Blandy <jimb@zwingli.cygnus.com> writes:
> Daniel Berlin <dan@cgsoftware.com> writes:
>> It's actually a bit worse than just needing to rewrite the dwarf2 reader.
>>
>> You actually can't fix the stabs reader without gcc's help and a hack.
>> For the stabs reader, you need to hack gcc to output fully qualified names
>> for us.
>> This is because if you look at the stabs section, you'll see we output
>> types by the normal name, instead of mangled name (types have no mangled
>> name, so it would be tricky to output them :P).
>> So we end up with numpunct<char> or, in this case "A".
>>
>> For DWARF2, we now have namespace support, and i'll see if i can get it
>> into 3.0.1. So instead of just seeing:
>>
>> DW_TAG_structure_type:
>> DW_AT_name: A
>> we now see
>> DW_TAG_namespace
>> DW_AT_name: N
>> DW_TAG_structure_type:
>> DW_AT_name: A
>>
>> and pull "N::A" out of this.
>> Yay!
>
> Can you post the GCC patches for generating namespace information
> here? That way, we can start working on GDB's support, and be ready
> when GCC catches up.
Sure.
I'll just forward what i sent to gcc-patches.
I'll also post a new version of the new dwarf2 reader with namespace
support.
>
> (It seems to me that, if GCC is processing code that uses namespaces,
> and generating mangled names and typeinfo objects that contain
> prefixed names, but emitting Dwarf 2 information that has no record of
> those prefixes, that should be called a GCC bug. So it should be safe
> to count on it getting fixed, whether or not using your patch.)
Yes. The real problem we are running into, of course, is that types
themselves have no mangled names.
And if you fully qualified the name in the DW_AT_name attribute, you'd
run into all sorts of problems because DWARF2 really *can* support the
info we need, it just didn't output it.
So it's an obviously broken thing, because we have 0 chance of getting
the info we need. it's simply not there.
>
>> In both the stabs (for all cases), and dwarf2 (for 3.0 compiled files only,
>> assuming it gets into 3.0.1), we could insert amazingly evil hacks to try
>> to seperate out the namespace from the demangled names on other real
>> members of the structure/type/whatever.
>
> That does sound evil.
>
> GDB has a tradition of accomodating broken debug info producers. But
> even when we can pin the problem on a specific version of the
> compiler, those accomodations make the code harder to work with. "If
> I make this change, will it break our GCC 3.0 support? I don't have
> GCC 3.0 installed anywhere anymore..."
>
> But until someone fixes stabs, I think it's reasonable to tell C++
> users that GCC only provides sufficient information when using Dwarf
> 2.
--
"I didn't get a toy train like the other kids. I got a toy
subway instead. You couldn't see anything, but every now and
then you'd hear this rumbling noise go by.
"-Steven Wright
next prev parent reply other threads:[~2001-06-30 12:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=87lmm9n4t6.fsf@cgsoftware.com \
--to=dan@cgsoftware.com \
--cc=gdb@sources.redhat.com \
--cc=jimb@zwingli.cygnus.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