This is the mail archive of the gdb-patches@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]

Re: [PATCH] language support: case sensitivity


    Date: Tue, 1 Aug 2000 15:24:37 -0700 (PDT)
    From: Jimmy Guo <guo@cup.hp.com>
    Subject: [PATCH] language support: case sensitivity

Suggestion: use [RFA] rather than [PATCH] when it's a request for
approval.

If I'm in a hurry (and I suspect I'm not the only one), I'll sometimes
put off until later (or even skip altogether) messages that say
[PATCH] figuring that they are notifying me of an approved patch that
the person is committing / has committed -- and I'll pick it up next
time I update.

Messages that say [RFA] (Request For Approval) get looked at sooner on
the theory that they might be something I need to do.

    This patch adds case sensivity support and sets language specific case
    sensitivity setting to *_language_defn.  This is necessary to support
    Fortran symbol lookup which is case insensitive.

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.

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