public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH]Add --style switch to binutils
@ 2000-06-20 13:01 Ken Block
  2000-06-20 13:04 ` DJ Delorie
  2000-06-20 13:15 ` H . J . Lu
  0 siblings, 2 replies; 7+ messages in thread
From: Ken Block @ 2000-06-20 13:01 UTC (permalink / raw)
  To: binutils

The --style switch allows tools to select which demangler is used. For
example --style=gnu-new-abi will use the new ABI demangler. The current
supported styles are: auto,gnu,lucid,arm,hp,edg,gnu-new-abi. All tools
that support demangling should support this switch. This includes: nm,
objdump, addr2line, ld, and gprof.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]Add --style switch to binutils
  2000-06-20 13:01 [PATCH]Add --style switch to binutils Ken Block
@ 2000-06-20 13:04 ` DJ Delorie
  2000-06-20 13:38   ` Ken Block
  2000-06-20 13:15 ` H . J . Lu
  1 sibling, 1 reply; 7+ messages in thread
From: DJ Delorie @ 2000-06-20 13:04 UTC (permalink / raw)
  To: block; +Cc: binutils

"--style" sounds like an awfully generic name.  How about
"--demangler" instead?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]Add --style switch to binutils
  2000-06-20 13:01 [PATCH]Add --style switch to binutils Ken Block
  2000-06-20 13:04 ` DJ Delorie
@ 2000-06-20 13:15 ` H . J . Lu
  1 sibling, 0 replies; 7+ messages in thread
From: H . J . Lu @ 2000-06-20 13:15 UTC (permalink / raw)
  To: Ken Block; +Cc: binutils

On Tue, Jun 20, 2000 at 04:00:06PM -0400, Ken Block wrote:
> The --style switch allows tools to select which demangler is used. For
> example --style=gnu-new-abi will use the new ABI demangler. The current
> supported styles are: auto,gnu,lucid,arm,hp,edg,gnu-new-abi. All tools
> that support demangling should support this switch. This includes: nm,
> objdump, addr2line, ld, and gprof.
> 
> 

My version does it differently. I put all the code in libiberty instead
of duplicating it everywhere. Also --help gives something like:

	...
	[--style={auto,gnu,lucid,arm,hp,edg,gnu-new-abi,gnat,compaq}]

The "{auto,gnu,lucid,arm,hp,edg,gnu-new-abi,gnat,compaq}" string also
comes from libiberty.

H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]Add --style switch to binutils
  2000-06-20 13:04 ` DJ Delorie
@ 2000-06-20 13:38   ` Ken Block
  2000-06-20 20:12     ` Doug Evans
  2000-06-23  2:02     ` Philippe De Muyter
  0 siblings, 2 replies; 7+ messages in thread
From: Ken Block @ 2000-06-20 13:38 UTC (permalink / raw)
  To: DJ Delorie; +Cc: binutils

If people would prefer --style be --demangler, I have no objections.
--style is what is used in H.J. Lu's binutils. Previously, it was
--lang.

There is another switch --demangler which takes the name of a shared
object and an entry point. These are used to dynamically load a
demangler from a shared object.

  { {"demangler", no_argument, NULL, OPTION_DEMANGLER},
      '\0', "DSO:FUNCTION", N_("Set DSO and demangler function"),
TWO_DASHES },

I'm not submitting that patch at this time since it has not been view
favorably in the past.


DJ Delorie wrote:

> "--style" sounds like an awfully generic name.  How about
> "--demangler" instead?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]Add --style switch to binutils
  2000-06-20 13:38   ` Ken Block
@ 2000-06-20 20:12     ` Doug Evans
  2000-06-23  2:02     ` Philippe De Muyter
  1 sibling, 0 replies; 7+ messages in thread
From: Doug Evans @ 2000-06-20 20:12 UTC (permalink / raw)
  To: Ken Block; +Cc: DJ Delorie, binutils

Ken Block writes:
 > If people would prefer --style be --demangler, I have no objections.

--style has to be utterly unacceptable (IMNSHO fwiw).
It's far too generic and thus meaningless.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]Add --style switch to binutils
  2000-06-20 13:38   ` Ken Block
  2000-06-20 20:12     ` Doug Evans
@ 2000-06-23  2:02     ` Philippe De Muyter
  2000-06-23  6:57       ` Ken Block
  1 sibling, 1 reply; 7+ messages in thread
From: Philippe De Muyter @ 2000-06-23  2:02 UTC (permalink / raw)
  To: Ken Block; +Cc: dj, binutils

Ken Block wrote :
> If people would prefer --style be --demangler, I have no objections.
> --style is what is used in H.J. Lu's binutils. Previously, it was
> --lang.
> 
> There is another switch --demangler which takes the name of a shared
> object and an entry point. These are used to dynamically load a
> demangler from a shared object.
> 
> [...]
> 
> DJ Delorie wrote:
> 
> > "--style" sounds like an awfully generic name.  How about
> > "--demangler" instead?
> 
How about --mangling-style ?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH]Add --style switch to binutils
  2000-06-23  2:02     ` Philippe De Muyter
@ 2000-06-23  6:57       ` Ken Block
  0 siblings, 0 replies; 7+ messages in thread
From: Ken Block @ 2000-06-23  6:57 UTC (permalink / raw)
  To: dje, H. J. Lu, phdm, dj, binutils

Philippe De Muyter wrote:

> Ken Block wrote :
> > If people would prefer --style be --demangler, I have no objections.
> > --style is what is used in H.J. Lu's binutils. Previously, it was
> > --lang.
> >
> > There is another switch --demangler which takes the name of a shared
> > object and an entry point. These are used to dynamically load a
> > demangler from a shared object.
> >
> > [...]
> >
> > DJ Delorie wrote:
> >
> > > "--style" sounds like an awfully generic name.  How about
> > > "--demangler" instead?
> >
> How about --mangling-style ?

Either is fine with me. Basically, there are currently 3 switches for
demangling under H.J's binutils.

--[no-]demangle -- enables/disables demangling

--style -- set mangling style to a known demangling style like GNU, HP,
etc.

--demangler -- uses a demangler that is external to the tool to perform
demangling.


So for example, to say I want to use "nm" and have it demangle using the
"HP" style, I do:

nm --demangle --style=HP.


I proposed to H.J. that we consolidate the --style swtich and the
--demangler switch and have the argument be overloaded. That if you say
"--demangler=HP" you get the HP demangler, but if you say
"--demangler=foo:bar" you get the external demangler looked up as foo
with the parameter bar.

I was wondering if it was further possible to fold the --demangle and the
--demangler switch together such that I could say "nm --demangle" and get
the default demangling or "nm --demangle=HP". Is this possible to do
within getopt? If I say "nm --demangle t.o", I do not want t.o be
interpreted as the optional argument. My understand of getopts is that if
an argument is optional, it must be provided in the --switch=arg form,
--switch form is disallowed. So this should work. So the documentation
should become:

--[no-]demangle[=<style>|<dso:function>] -- enable/disable demangling and
allows control over the demangling style using either a known style or an
external demangler. The default demangling style is GNU.

Phillippe, D.J. , Doug, since you guys objected to --style, would this be
acceptable?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-06-23  6:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-20 13:01 [PATCH]Add --style switch to binutils Ken Block
2000-06-20 13:04 ` DJ Delorie
2000-06-20 13:38   ` Ken Block
2000-06-20 20:12     ` Doug Evans
2000-06-23  2:02     ` Philippe De Muyter
2000-06-23  6:57       ` Ken Block
2000-06-20 13:15 ` H . J . Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).