Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: GDB's command qualifier character is `/'
Date: Tue, 21 Oct 2003 19:29:00 -0000	[thread overview]
Message-ID: <3F958924.7020906@gnu.org> (raw)
In-Reply-To: <20031020003248.GA20365@nevyn.them.org>


> All of the currently accepted / options that I can find are output
> format qualifiers.

While:
   /d /f /c
are certainly format qualfiers, I don't think repeat counts:
   /2 /16 ...
or size:
   /b /h /w /g
can be interpreted that way.  For instance

	(gdb) x/8 $pc
	...
	(gdb) print/8 main
	Item count other than 1 is meaningless in "print" command.
	(gdb) print/g main
	Size letters are meaningless in "print" command.

Note that the current code doesn't separate single letter qualfiers with 
a `/' ("x/8/f/g" isn't valid).  But tweaking the code to do this is 
easy, and I don't expect users to notice.

Also note that GDB's lack of a strong parser means that:
	x /8 $pc
is interpreted as:
	x/8 $pc

>  I find nothing strange or inconsistent about using
> a different syntax for options and for output qualifiers.  GDB doesn't
> have any examples of
>   break /shlib libc.so.6 round
> or
>   break /shlib:libc.so.6 round

``Note that this doesn't address "parameterized qualifiers" (tar/dump 
convention?) and "qualified parameters" (not allowed?)''.

To expand on "tar/dump convention", tar/dump put the parameters after 
the qualifiers vis:

	break/shlib libc.so.6 round

(it could get confusing if multiple qualfiers required parameters as 
occures with "tar xbf 1024 -").  So:

	break/shlib=libc.so.6 round

might be better ("=" avoids the shift key needed by ":").

>> (1) Personally, I'm always using the `/' qualifier, but I can't remember 
>> when, if ever, I used one of the UNIX style command options.
> 
> 
> That's because there are very few commands in all of GDB's CLI which
> _take_ options.  /, -, or otherwise.

The question to ask isn't how many commands use each syntax, but rather 
how many users use each syntax.  As a user, I use `/..' every day.   As 
a user, I don't think I've ever used `-...' syntax and only know of it 
because I've looked at the code.

Andrew


  reply	other threads:[~2003-10-21 19:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-19 16:50 Andrew Cagney
2003-10-20  0:32 ` Daniel Jacobowitz
2003-10-21 19:29   ` Andrew Cagney [this message]
2003-10-22  9:56     ` Andreas Schwab
2003-10-22 14:38       ` Andrew Cagney
2003-10-20 21:54 ` Jim Blandy

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=3F958924.7020906@gnu.org \
    --to=cagney@gnu.org \
    --cc=drow@mvista.com \
    --cc=gdb@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