public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] nm.c/objdump.c demangle short option bug fix.
@ 2002-06-03 15:47 Elias Athanasopoulos
  2002-06-06  4:51 ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Elias Athanasopoulos @ 2002-06-03 15:47 UTC (permalink / raw)
  To: binutils


2002-6-4  Elias Athanasopoulos  <eathan@otenet.gr>

        * nm.c: demangle short option bug fix.
	* objdump.c: Likewise.


--- nm.c.orig	Tue Jun  4 01:50:28 2002
+++ nm.c	Tue Jun  4 01:43:52 2002
@@ -422,7 +422,7 @@
   bfd_init ();
   set_default_bfd_target ();
 
-  while ((c = getopt_long (argc, argv, "aABCDef:gHhlnopPrst:uvVvX:",
+  while ((c = getopt_long (argc, argv, "aABC:Def:gHhlnopPrst:uvVvX:",
 			   long_options, (int *) 0)) != EOF)
     {
       switch (c)

--- objdump.c.orig	Tue Jun  4 01:48:07 2002
+++ objdump.c	Tue Jun  4 01:49:31 2002
@@ -2764,7 +2764,7 @@
   bfd_init ();
   set_default_bfd_target ();
 
-  while ((c = getopt_long (argc, argv, "pib:m:M:VvCdDlfaHhrRtTxsSj:wE:zgG",
+  while ((c = getopt_long (argc, argv, "pib:m:M:VvC:dDlfaHhrRtTxsSj:wE:zgG",
 			   long_options, (int *) 0))
 	 != EOF)
     {


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

* Re: [PATCH] nm.c/objdump.c demangle short option bug fix.
  2002-06-03 15:47 [PATCH] nm.c/objdump.c demangle short option bug fix Elias Athanasopoulos
@ 2002-06-06  4:51 ` Alan Modra
  2002-06-06  9:25   ` Elias Athanasopoulos
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2002-06-06  4:51 UTC (permalink / raw)
  To: Elias Athanasopoulos; +Cc: binutils

On Tue, Jun 04, 2002 at 02:00:47AM +0300, Elias Athanasopoulos wrote:
>         * nm.c: demangle short option bug fix.
> 	* objdump.c: Likewise.

This isn't right.  -C doesn't take an arg.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: [PATCH] nm.c/objdump.c demangle short option bug fix.
  2002-06-06  4:51 ` Alan Modra
@ 2002-06-06  9:25   ` Elias Athanasopoulos
  2002-06-06 17:43     ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Elias Athanasopoulos @ 2002-06-06  9:25 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

Hi Alan,

On Thu, Jun 06, 2002 at 09:21:19PM +0930, Alan Modra wrote:
> On Tue, Jun 04, 2002 at 02:00:47AM +0300, Elias Athanasopoulos wrote:
> >         * nm.c: demangle short option bug fix.
> > 	* objdump.c: Likewise.
> 
> This isn't right.  -C doesn't take an arg.

I believe it does.

binutils/nm.c (main.c):

	case 'C': 
          do_demangle = 1; 
          if (optarg != NULL)
            {
              enum demangling_styles style;
              
              style = cplus_demangle_name_to_style (optarg);
              if (style == unknown_demangling) 
                fatal (_("unknown demangling style `%s'"),
                       optarg);
              
              cplus_demangle_set_style (style);
           }
          break;

Elias

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

* Re: [PATCH] nm.c/objdump.c demangle short option bug fix.
  2002-06-06  9:25   ` Elias Athanasopoulos
@ 2002-06-06 17:43     ` Alan Modra
  2002-06-07  0:32       ` Elias Athanasopoulos
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2002-06-06 17:43 UTC (permalink / raw)
  To: Elias Athanasopoulos; +Cc: binutils

On Thu, Jun 06, 2002 at 07:39:06PM +0300, Elias Athanasopoulos wrote:
> Hi Alan,
> 
> On Thu, Jun 06, 2002 at 09:21:19PM +0930, Alan Modra wrote:
> > On Tue, Jun 04, 2002 at 02:00:47AM +0300, Elias Athanasopoulos wrote:
> > >         * nm.c: demangle short option bug fix.
> > > 	* objdump.c: Likewise.
> > 
> > This isn't right.  -C doesn't take an arg.
> 
> I believe it does.
> 
> binutils/nm.c (main.c):
> 
> 	case 'C': 

Showing this code snippet doesn't prove anything.  case 'C' also
handles --demangle, which does take an optional arg.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: [PATCH] nm.c/objdump.c demangle short option bug fix.
  2002-06-06 17:43     ` Alan Modra
@ 2002-06-07  0:32       ` Elias Athanasopoulos
  2002-06-07  0:54         ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: Elias Athanasopoulos @ 2002-06-07  0:32 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

On Fri, Jun 07, 2002 at 10:13:14AM +0930, Alan Modra wrote:
> On Thu, Jun 06, 2002 at 07:39:06PM +0300, Elias Athanasopoulos wrote:

> > binutils/nm.c (main.c):
> > 
> > 	case 'C': 
> 
> Showing this code snippet doesn't prove anything.  case 'C' also
> handles --demangle, which does take an optional arg.

Aren't '-C' and '--demangle' equivelant as, for example, '-f' and
'--format' are? How can someone specify the demnagle style using
'-C?' Or what's the purpose of the '-C' option. If it doesn't take
an 'optional' arg then the listed usage is wrong, because it is exactly 
the same with the '-t' and '-f' cases (both of them do take
an option).

Elias

-- 
http://gnewtellium.sourceforge.net			MP3 is not a crime.	

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

* Re: [PATCH] nm.c/objdump.c demangle short option bug fix.
  2002-06-07  0:32       ` Elias Athanasopoulos
@ 2002-06-07  0:54         ` Alan Modra
  2002-06-07  3:13           ` Andreas Schwab
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2002-06-07  0:54 UTC (permalink / raw)
  To: Elias Athanasopoulos; +Cc: binutils

On Fri, Jun 07, 2002 at 10:46:49AM +0300, Elias Athanasopoulos wrote:
> On Fri, Jun 07, 2002 at 10:13:14AM +0930, Alan Modra wrote:
> > On Thu, Jun 06, 2002 at 07:39:06PM +0300, Elias Athanasopoulos wrote:
> 
> > > binutils/nm.c (main.c):
> > > 
> > > 	case 'C': 
> > 
> > Showing this code snippet doesn't prove anything.  case 'C' also
> > handles --demangle, which does take an optional arg.
> 
> Aren't '-C' and '--demangle' equivelant

No.

> as, for example, '-f' and
> '--format' are? How can someone specify the demnagle style using
> '-C?'

You can't.

> Or what's the purpose of the '-C' option. If it doesn't take
> an 'optional' arg then the listed usage is wrong, because it is exactly 
> the same with the '-t' and '-f' cases (both of them do take
> an option).

No, -t and -f are different in that they _require_ an arg.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: [PATCH] nm.c/objdump.c demangle short option bug fix.
  2002-06-07  0:54         ` Alan Modra
@ 2002-06-07  3:13           ` Andreas Schwab
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2002-06-07  3:13 UTC (permalink / raw)
  To: binutils

Alan Modra <amodra@bigpond.net.au> writes:

|> On Fri, Jun 07, 2002 at 10:46:49AM +0300, Elias Athanasopoulos wrote:
|> > as, for example, '-f' and
|> > '--format' are? How can someone specify the demnagle style using
|> > '-C?'
|> 
|> You can't.

Then the output of "objdump --help" should be fixed to make that clear.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

end of thread, other threads:[~2002-06-07 10:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-03 15:47 [PATCH] nm.c/objdump.c demangle short option bug fix Elias Athanasopoulos
2002-06-06  4:51 ` Alan Modra
2002-06-06  9:25   ` Elias Athanasopoulos
2002-06-06 17:43     ` Alan Modra
2002-06-07  0:32       ` Elias Athanasopoulos
2002-06-07  0:54         ` Alan Modra
2002-06-07  3:13           ` Andreas Schwab

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).