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: David Taylor <taylor at cygnus dot com>
- Subject: Re: [PATCH] language support: case sensitivity
- From: Jimmy Guo <guo at cup dot hp dot com>
- Date: Wed, 2 Aug 2000 09:55:23 -0700 (PDT)
- Cc: gdb-patches at sourceware dot cygnus dot com
Thanks for looking into it ... I will use RFA from now on.
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
>I like it, but I have a problem with a couple of the details.
>
>The language.h, C, asm, chill, fortran, and modula2 parts are
>approved. The C++, Java, Pascal, and Scheme parts look okay, but
>check with Daniel Berlin, Anthony Green, Pierre Muller, and Jim Blandy
>for the final say so. The symtab.c part also looks okay to me, but
>it's up to Jim Blandy.
>
>For the language.c change, see below.
>
> Tue Aug 1 15:02:17 Jimmy Guo <guo@cup.hp.com>
>
> * language.c: Define case_mode, case_sensitivity. Set case
> sensitivity on for unknown_language_defn, auto_language_defn,
> and local_language_defn.
> (show_case_command,set_case_command,set_case_str): New static func.
> (set_type_range_case): New static func, replaces set_type_range ().
> (set_language_command,set_type_command,set_range_command,set_language):
> Call set_type_range_case ().
> (language_info): Print case sensitivity setting.
> (_initialize_language): Add set/show commands for 'case-sensitive'.
> Set default case mode 'auto'. Set default language 'auto'.
>
>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.