From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6854 invoked by alias); 29 Apr 2010 23:09:26 -0000 Received: (qmail 6844 invoked by uid 22791); 29 Apr 2010 23:09:25 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Apr 2010 23:09:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2118D2BAB9C; Thu, 29 Apr 2010 19:09:20 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mqQrLIsPfBI9; Thu, 29 Apr 2010 19:09:20 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DCA5E2BAB99; Thu, 29 Apr 2010 19:09:19 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BF01DF5896; Thu, 29 Apr 2010 16:09:17 -0700 (PDT) Date: Thu, 29 Apr 2010 23:09:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: gdb-patches@sourceware.org Subject: Re: [RFC] pascal: Add lowercase copy of symbol name Message-ID: <20100429230917.GB2768@adacore.com> References: <002101cae7e9$e7229540$b567bfc0$@muller@ics-cnrs.unistra.fr> <20100429223157.GA2768@adacore.com> <002a01cae7ee$e144b6d0$a3ce2470$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002a01cae7ee$e144b6d0$a3ce2470$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00974.txt.bz2 > 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 Maybe you can do something similar for Pascal? -- Joel