From: Daniel Berlin <dberlin@dberlin.org>
To: Jim Ingham <jingham@apple.com>
Cc: Daniel Jacobowitz <drow@mvista.com>, gdb-patches@sources.redhat.com
Subject: Re: RFA: Search for symbol names the same way they're hashed.
Date: Thu, 03 Oct 2002 08:15:00 -0000 [thread overview]
Message-ID: <F7FCBF4E-D6E2-11D6-AC80-000393575BCC@dberlin.org> (raw)
In-Reply-To: <CFE8F1D7-D66E-11D6-BB61-00039379E320@apple.com>
On Wednesday, October 2, 2002, at 09:24 PM, Jim Ingham wrote:
> Daniel,
>
> On Wednesday, October 2, 2002, at 06:16 PM, Daniel Jacobowitz wrote:
>
>> On Wed, Oct 02, 2002 at 05:48:01PM -0700, Jim Ingham wrote:
>>>
>>> On Wednesday, October 2, 2002, at 02:50 PM,
>>> gdb-patches-digest-help@sources.redhat.com wrote:
>>>
>>>>> We need to make demangling-style only affect *printout* and *user
>>>>> entered strings*, and during symbol reading, force it to auto, so
>>>>> it
>>>>> always gets the right names in the symbol table in the first place.
>>>>
>>>> Doesn't that sort of defeat the point of letting the user set
>>>> demangling style? It's in case something goes wrong with
>>>> autodetection....
>>>>
>>>>>> The source code name of a symbol does not depend depend on the
>>>>>> current
>>>>>> demangling setting;
>>>>>
>>>>> And to enforce this, you have to make the readers *not* honor the
>>>>> demangling style. If you just fix SYMBOL_SOURCE_NAME,
>>>>> SYMBOL_INIT_DEMANGLED_NAME will still be only called once, and
>>>>> it'll
>>>>> have the wrong demangling style when it calls cplus_demangle,
>>>>> resulting
>>>>> in the symbol having the wrong demangled name forevermore.
>>>>
>>>> Perhaps we need to decide what the point of letting users force the
>>>> demangle style is, first.
>>>
>>> The case where we have had to use this was because we had private C++
>>> API's in some of the Mac OS X frameworks for 10.2 (which was compiled
>>> with gcc 3.1) but users who didn't want to move their C++ code to 3.1
>>> yet. When you hit the frameworks, gdb would see _Z, and assume the
>>> mangling style was the 3.1 style. Of course, all their code was
>>> 2.95,
>>> and they didn't in general care about the C++ stuff in frameworks
>>> (Apple tries not to export C++ API's if it can help it). So forcing
>>> demangling to 2.95 was useful in this case.
>>>
>>> This should, hopefully, be just a short term problem. Very few of
>>> our
>>> customers are still using 2.95 that we know about. But it is still
>>> worth keeping in mind for the next year or so...
>>
>> Time to unconfuse one issue:
>>
>> Jim, are you sure that you are talking about _demangling_ style? It
>> is
>> orthogonal to 'set cp-abi'. I'm talking about 'set demangle-style'
>> here. I assume in a mixed v2/v3 environment you'd want 'auto' anyway.
>>
>
> Oh, sorry, my mistake... But you don't want "auto" in a mixed
> environment, because auto chooses v3 when it sees it. For the folks
> using v2, the v3 bits are all stuff they don't care at all about. So
> you have to force it to v2. We did all this already, however, IIRC...
>
No, auto doesn't *switch* to v3 mode, when it sees a v3, it just uses
the v3 demangler for that string.
If you next hand it a v2 string, it should demangle it properly as well.
Otherwise, something is broken.
I just tried it with C++filt, to make sure, and it does work:
bash-2.05a$ c++filt
_a__3bob [This is a v2 mangled name]
bob::a(void)
__ZN3bob1aEv [This is a v3 mangled name]
bob::a()
--Dan
next prev parent reply other threads:[~2002-10-03 15:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1033595444.9324.ezmlm@sources.redhat.com>
2002-10-02 17:49 ` Jim Ingham
2002-10-02 18:16 ` Daniel Jacobowitz
2002-10-02 18:25 ` Jim Ingham
2002-10-03 8:15 ` Daniel Berlin [this message]
2002-10-01 20:45 Jim Blandy
2002-10-02 10:45 ` David Carlton
2002-10-02 12:35 ` Jim Blandy
2002-10-02 12:41 ` David Carlton
2002-10-02 13:02 ` Daniel Jacobowitz
2002-10-02 13:20 ` David Carlton
2002-10-02 13:25 ` Daniel Jacobowitz
2002-10-02 13:43 ` Daniel Berlin
2002-10-02 14:03 ` Daniel Jacobowitz
2002-10-02 16:10 ` Daniel Berlin
2002-10-02 11:04 ` Daniel Jacobowitz
2002-10-02 12:10 ` David Carlton
2002-10-07 16:19 ` David Carlton
2002-10-07 16:38 ` Daniel Jacobowitz
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=F7FCBF4E-D6E2-11D6-AC80-000393575BCC@dberlin.org \
--to=dberlin@dberlin.org \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jingham@apple.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