From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3939 invoked by alias); 6 Feb 2011 22:46:46 -0000 Received: (qmail 3927 invoked by uid 22791); 6 Feb 2011 22:46:46 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 Feb 2011 22:46:42 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p16MkfDJ003550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 6 Feb 2011 17:46:41 -0500 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p16MkdMV005862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Feb 2011 17:46:40 -0500 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p16MkcUX021696; Sun, 6 Feb 2011 23:46:38 +0100 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id p16Mkc58021692; Sun, 6 Feb 2011 23:46:38 +0100 Date: Sun, 06 Feb 2011 22:46:00 -0000 From: Jan Kratochvil To: Keith Seitz Cc: Tom Tromey , gdb-patches@sourceware.org Subject: [patch 3/3] Various linespec fixups [Re: [RFA] c++/11734 revisited] Message-ID: <20110206224638.GD5000@host1.dyn.jankratochvil.net> References: <4D002672.5090504@redhat.com> <4D07CD68.5000700@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D07CD68.5000700@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2011-02/txt/msg00118.txt.bz2 Hi Keith, [patch 3/3] is reapplication of (c). that is various linespec fixes which you did along in the original physname patch. THis set is not yet complete. Jan --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -40,6 +40,7 @@ #include "interps.h" #include "mi/mi-cmds.h" #include "target.h" +#include /* We share this one with symtab.c, but it is not exported widely. */ @@ -1007,6 +1008,17 @@ set_flags (char *arg, int *is_quoted, char **paren_pointer) if (*paren_pointer != NULL) *paren_pointer = strrchr (*paren_pointer, ')'); + /* Make sure we keep important kewords like "const" */ + if (*paren_pointer != NULL) + { + /* Skip trailing Java types. */ + while ((*paren_pointer)[1] && !isspace ((*paren_pointer)[1])) + (*paren_pointer)++; + + if (strncmp (*paren_pointer + 1, " const", 6) == 0) + (*paren_pointer) += 6; + } + /* Now that we're safely past the paren_pointer check, put back " if (condition)" so outer layers can see it. */ if (has_if)