This is the mail archive of the gdb-patches@sourceware.org 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: [RFC] pascal: Add lowercase copy of symbol name


>   The problem is that if we want to keep the true case of the symbols
>   (which I at least want), doing case-insensitive searching required
>   practically to lowercase on the fly all pascal symbol each time an
>   expression is evaluated.  This is very inefficient.

The way Ada handles this is by lower-casing the expression being used
as the key, and then comparing it with the name stored in our symbol.
For instance, if the user does:

        (gdb) print My_Variable

What GDB does is first lower-case "My_Variable" to "my_variable", and
then do a search of my_variable.

You could transpose that to Pascal by upper-casing My_Variable the
entity name in the expression before doing the search.

>   There are some internal functions or variables inside Free Pascal
>   that are lowercase to avoid possible conflict with explicitly
>   declared functions or variables (who are completely UPPERCASED in
>   Free Pascal).

Using Ada as an example, we have the same sort of issue, and what
we have been using is a special syntax to tell the parser to avoid
the casing-change:

        (gdb) print <My_Variable>

Maybe you can do something similar for Pascal?

-- 
Joel


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