From patchwork Fri Jan 9 16:16:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Muller X-Patchwork-Id: 4587 Received: (qmail 30609 invoked by alias); 9 Jan 2015 16:16:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 30594 invoked by uid 89); 9 Jan 2015 16:16:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_00, MSGID_MULTIPLE_AT autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.222.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Jan 2015 16:16:35 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id 4B24A1413E3; Fri, 9 Jan 2015 17:16:32 +0100 (CET) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id 3B56B141465; Fri, 9 Jan 2015 17:16:32 +0100 (CET) Received: from lmr.u-strasbg.fr (lmr3.u-strasbg.fr [172.30.21.3]) by mr2.u-strasbg.fr (Postfix) with ESMTP id 1CC901413E3; Fri, 9 Jan 2015 17:16:30 +0100 (CET) Received: from lmr.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id E1648DF; Fri, 9 Jan 2015 17:16:29 +0100 (CET) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (Authenticated sender: mullerp) by lmr3.u-strasbg.fr (Postfix) with ESMTPSA id 9F3BDDA; Fri, 9 Jan 2015 17:16:27 +0100 (CET) From: "Pierre Muller" To: "'Pedro Alves'" Cc: "'gdb-patches'" References: <54ae4586.01e3440a.7b06.fffff844SMTPIN_ADDED_BROKEN@mx.google.com> <54AE605A.8050308@redhat.com> <54ae7f9f.c323460a.36ed.ffffff30SMTPIN_ADDED_BROKEN@mx.google.com> <54AE8914.4010507@redhat.com> <54ae911b.85e3440a.1d96.5ffdSMTPIN_ADDED_BROKEN@mx.google.com> <54AFB2E5.5080307@redhat.com> In-Reply-To: <54AFB2E5.5080307@redhat.com> Subject: [RFA PATCH 1/3] Remember the case pattern that allowed finding a field of this. Date: Fri, 9 Jan 2015 17:16:27 +0100 Message-ID: <001501d02c27$9fe84350$dfb8c9f0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 In the pascal parser, there is special code that will try to emulate case-insensivity despite the fact that pascal is not registered as a 'case-insensitive' language. This code does not work as expected for fields of a class, for which exact casing is currently required. The patch below fixes this problem. Pierre Muller gdb/ChangeLog entry: 2015-01-07 Pierre Muller PR pascal/17815 * p-exp.y (yylex): Remember the case pattern that allowed finding a field of this. --- gdb/p-exp.y | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/p-exp.y b/gdb/p-exp.y index a1c78bf..3a4905a 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -1598,7 +1598,7 @@ yylex (void) VAR_DOMAIN, &is_a_field_of_this); } - if (is_a_field) + if (is_a_field || (is_a_field_of_this.type != NULL)) { tempbuf = (char *) realloc (tempbuf, namelen + 1); strncpy (tempbuf, tmp, namelen); @@ -1606,7 +1606,11 @@ yylex (void) yylval.sval.ptr = tempbuf; yylval.sval.length = namelen; free (uptokstart); - return FIELDNAME; + yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL; + if (is_a_field) + return FIELDNAME; + else + return NAME; } /* Call lookup_symtab, not lookup_partial_symtab, in case there are no psymtabs (coff, xcoff, or some future change to blow away the @@ -1739,7 +1743,6 @@ yylex (void) free(uptokstart); /* Any other kind of symbol. */ yylval.ssym.sym = sym; - yylval.ssym.is_a_field_of_this = is_a_field_of_this.type != NULL; return NAME; } }