This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC] pascal: Add lowercase copy of symbol name
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Joel Brobecker'" <brobecker at adacore dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Fri, 30 Apr 2010 00:54:06 +0200
- Subject: RE: [RFC] pascal: Add lowercase copy of symbol name
- References: <002101cae7e9$e7229540$b567bfc0$@muller@ics-cnrs.unistra.fr> <20100429223157.GA2768@adacore.com>
> I can't really say that I am fond of this approach - at all. We already
> store the linkage name as well as the natural name. Can't you use that
> in the language-specific lookup routines to make the search case
> insensitive?
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.
> There is also something I'm confused about: If Pascal is *not* case-
> sensitive, why make the debugger optionally case-sensitive? Why not
> always have a case-insensitive interpreter? You aluded that there were
> some reasons...
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).
GNU pascal uses First Letter Capitalization for its
declared function/variables (I don't know the internals of GPC).
In the printout, I would like to keep this difference
between internal and declared variables.
If I have an internal variable named stdout,
and a declared variable STDOUT.
I would really prefer to still be able to
only get one matching variable if I use the exact matching
stdout or STDOUT.
Pierre Muller
Pascal language support maintainer for GDB