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: Daniel Berlin <dberlin at cygnus dot com>
- Date: Wed, 9 Aug 2000 20:08:26 -0700 (PDT)
- cc: Jim Blandy <jimb at cygnus dot com>, gdb-patches at sourceware dot cygnus dot com
On Wed, 9 Aug 2000, Jimmy Guo wrote:
> ??? Please elaborate. At the very least in the case of C++, it's case
> sensitive, so there's no change with regard to the current behavior if
> the patch is applied. Besides, name is a char * parameter in
> lookup_symtab.
No, I mean lookup_symbol used to do nothing with the name.
My patch, among other things, needs to do something with it.
In particular, demangle it.
Demangling, when it fails, returns null, so i can't do
name=cplus_demangle(name)
or I lose the original name.
So i changed the parameter to "original_name", so i could do:
name=cplus_demangle(original_name);
if (!name)
name=original_name;
And of course, 5 seconds before i do a diff, and submit the patch, the
parameter name gets changed to something else.
I swear it's a conspiracy to cause me to hand edit my patches.
--Dan
>
> - Jimmy
>
> On 9 Aug 2000, Daniel Berlin wrote:
>
> >Jim Blandy <jimb@zwingli.cygnus.com> writes:
> >
> >Damnit, i'm five seconds away from submitting a patch to remove the
> >linear searches on C++ symbols completely, and I do it by always
> >demangling the name we search for, so i also make a copy of the name
> >in case demangling fails, and you go approve a patch that changes the
> >name.
> >
> >--Dan
> >> This is approved, with the following changes:
> >>
> >> Scheme is not case-sensitive. R5RS, section 2: "Upper and lower case
> >> forms of a letter are never distinguished except within character and
> >> string constants. For example, Foo is the same identifier as FOO, and
> >> #x1AB is the same number as #X1ab."
> >>
> >> In lookup_symbol, please just go ahead and change the value of `name';
> >> don't change every use of `name' to `copy'. `copy' is a poor variable
> >> name. If it is necessary to keep the original, unmodified name
> >> around, keep it in a variable named `original_name'. (But I don't see
> >> any remaining uses of `name', so I don't think this is necessary.)
> >>
> >> Please update the comment above the call to check_field.
> >>
> >> Thanks!
>
>