Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] pascal: Add lowercase copy of symbol name
Date: Thu, 29 Apr 2010 23:09:00 -0000	[thread overview]
Message-ID: <20100429230917.GB2768@adacore.com> (raw)
In-Reply-To: <002a01cae7ee$e144b6d0$a3ce2470$@muller@ics-cnrs.unistra.fr>

>   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


  reply	other threads:[~2010-04-29 23:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-29 22:18 Pierre Muller
2010-04-29 22:32 ` Joel Brobecker
2010-04-29 22:54   ` Pierre Muller
2010-04-29 23:09     ` Joel Brobecker [this message]
2010-04-30  7:27 ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100429230917.GB2768@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox