From: Andrew Cagney <ac131313@redhat.com>
To: Adam Fedor <fedor@doc.com>
Cc: David Carlton <carlton@math.stanford.edu>,
GDB Patches <gdb-patches@sources.redhat.com>,
Daniel Jacobowitz <drow@mvista.com>
Subject: Re: [RFA] Compile objc-lang.c, objc-exp.tab.c [1/5]
Date: Tue, 01 Apr 2003 00:31:00 -0000 [thread overview]
Message-ID: <3E88DDD0.2090603@redhat.com> (raw)
In-Reply-To: <99FCC0F2-63CE-11D7-9F75-000A277AC1A4@doc.com>
>
> On Monday, March 31, 2003, at 03:53 PM, David Carlton wrote:
>
> On Sun, 30 Mar 2003 19:23:08 -0700, Adam Fedor <fedor@doc.com> said:
>
> Here's my crack at doing [language-specific demangling].
>
>> This patch bothers me: it doesn't handle Java cleanly, and I'm not
>> sure about the 'options' argument to language_demangle. It seems to
>> me that, at the very least, there should be a java_demangle function
>> defined that takes the options passed in, applies '| DMGL_JAVA' to it,
>> and calls cplus_demangle.
> Sure. That makes sense.
>
>> But I also wanted to double-check: does 'options' really make sense
>> for all language types? If I'm reading the patch correctly, it looks
>> like Objective C just throws it away. If that's the case, then I
>> don't think that 'options' should be part of the language vector: if
>> C++ needs it for internal purposes, then C++ could have its own more
>> flexible demangler with that option (which Java could also use), but
>> the version in the language vector should be more restricted.
>
>
> Then I should go back to the case where if we know the language is cplus or java, then call cplus_demangle(/java_demangle), otherwise use language_demangle?
Either that, or add a FIXME comment explaining why the options shouldn't
be there.
The problem with trying to eliminate the parameter is that it also means
eliminating it from things like fprintf_symbol_filtered(). While likely
a good idea, it is getting beyond the scope of this immediate patch.
>> Also, I'm not convinced that it's best for the unknown language
>> demangler to always return NULL. Probably Adam's patch isn't too bad
>> in that regard: it will change the behavior of 'maint demangle', but
>> we can work around that if it's important, and it won't change the
>> behavior of fprintf_symbol_filtered; those are the only places where
>> Adam's patch actually calls language_demangler. But, given that we
>> don't always reliably know the current language (and could conceivably
>> figure that out via demangling, modulo Java/C++ confusion), I'm not
>> convinced that returning NULL is the right thing. (Or that it isn't
>> the right thing.)
Hmm, good catch. Any reason for the unknown language demangler to not
just do c++ demangling?
Andrew
next prev parent reply other threads:[~2003-04-01 0:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 22:06 Adam Fedor
2003-02-19 19:02 ` Elena Zannoni
2003-02-19 20:27 ` Adam Fedor
2003-02-19 21:11 ` Elena Zannoni
2003-03-20 21:27 ` Andrew Cagney
2003-03-20 21:39 ` Daniel Jacobowitz
2003-03-20 22:13 ` Andrew Cagney
2003-03-20 22:19 ` Daniel Jacobowitz
2003-03-31 2:23 ` Adam Fedor
2003-03-31 22:39 ` Andrew Cagney
2003-03-31 22:53 ` David Carlton
2003-03-31 23:03 ` David Carlton
2003-03-31 23:15 ` Adam Fedor
2003-04-01 0:31 ` Andrew Cagney [this message]
2003-04-01 0:45 ` David Carlton
2003-04-01 4:09 ` Adam Fedor
2003-04-01 21:31 ` David Carlton
2003-04-01 21:38 ` Daniel Jacobowitz
2003-03-20 22:22 ` David Ayers
2003-03-20 21:35 ` Andrew Cagney
2003-03-24 17:46 ` Adam Fedor
2003-03-24 18:25 ` Andrew Cagney
2003-03-25 2:23 ` Adam Fedor
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=3E88DDD0.2090603@redhat.com \
--to=ac131313@redhat.com \
--cc=carlton@math.stanford.edu \
--cc=drow@mvista.com \
--cc=fedor@doc.com \
--cc=gdb-patches@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