This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] language support: case sensitivity
- To: Jimmy Guo <guo at cup dot hp dot com>
- Subject: Re: [PATCH] language support: case sensitivity
- From: David Taylor <taylor at cygnus dot com>
- Date: Thu, 03 Aug 2000 10:33:26 -0400
- cc: gdb-patches at sourceware dot cygnus dot com
Date: Wed, 2 Aug 2000 09:55:23 -0700 (PDT)
From: Jimmy Guo <guo@cup.hp.com>
I don't quite understand yet the need for having a new show command
routine ... command.c (do_setshow_command) seems to be the one that
handle the normal output of settings. Also, show_language_command
has similar setup as show_case_command (). Do you have an example on
the kind of behavior you'd like to see but not supported currently by
this patch?
- Jimmy Guo, guo@cup.hp.com
You added two commands:
set case-sensitivity
show case-sensitivity
And if the user types "show case-sensitivity", nothing will print
unless the sensitivity differs from that of the current language. I
feel that if the user *ASKED* to be shown the case sensitivity, then
the user should be *SHOWN* the case sensitivity. If the user
explicitily asks what it is, then it should not be silent.
So, you could have the command "show case-sensitivity" print something like:
Case sensitivity is on.
warning: current language, fortran, is case insensitive.
Where the first line is printed by a new function (to be called when
the user types "show case-sensitivity"), and the second line is
printed by the function (renamed) that currently implements "show
case-sensitivity".
[...]
>Your new function show_case_command plays double duty -- it is both
>invoked by other functions / commands and it is invoked by the user in
>response to the 'show case' command. And while it is quite reasonable
>for it to be silent when it is *NOT* invoked by the user, it should
>not be silent when it is invoked by the user.
>
>My suggestion is to define two functions:
>
>. one, the new show_case_command, which is never silent -- it always
>tells you the setting.
>
>. the other, the current show_case_command, prints a warning if
>appropriate and is called by the current callers of show_case_command.
>
>Otherwise it looks fine to me. Thanks for submitting this.