This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB's command qualifier character is `/'


Andrew Cagney <cagney@gnu.org> writes:
> GDB's CLI, long ago established `/' as its command qualifier character vis:
> 
> 	x/i
> 	display/i
> 	print/x
> 
> GDB's user base is very familar with this syntax(1) so adding new
> qualfiers using this syntax would provide a consistent user experience
> (if there is x/i, how come there isn't "info break/l"?).

I think / is only for format specifiers, not a general-purpose command
qualifier thing.

It seems to me that GDB has tended to use words for command
qualifiers, like:

  break foo if x == 10
  break foo thread 4
  `append [binary] memory FILENAME START_ADDR END_ADDR'
  `append [binary] value FILENAME EXPR'

We do have some existing examples of Unix-like command options:

  `symbol-file FILENAME [ -readnow ] [ -mapped ]'
  `file FILENAME [ -readnow ] [ -mapped ]'

  `add-symbol-file FILENAME ADDRESS'
  `add-symbol-file FILENAME ADDRESS [ -readnow ] [ -mapped ]'
  `add-symbol-file FILENAME -sSECTION ADDRESS ...'

I'd love to see discussion about how to pull these things together a
bit more, but I think it's difficult to argue that there is a
consistent rule in place already.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]