From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27249 invoked by alias); 16 Nov 2011 04:57:41 -0000 Received: (qmail 27235 invoked by uid 22791); 16 Nov 2011 04:57:39 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Nov 2011 04:57:23 +0000 Received: by vcbfo11 with SMTP id fo11so82496vcb.0 for ; Tue, 15 Nov 2011 20:57:23 -0800 (PST) Received: by 10.224.217.131 with SMTP id hm3mr19670936qab.81.1321419443198; Tue, 15 Nov 2011 20:57:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.217.131 with SMTP id hm3mr19670929qab.81.1321419443126; Tue, 15 Nov 2011 20:57:23 -0800 (PST) Received: by 10.224.6.76 with HTTP; Tue, 15 Nov 2011 20:57:22 -0800 (PST) In-Reply-To: References: <20111028221459.GA28467@host1.jankratochvil.net> <20111104074543.GA13839@host1.jankratochvil.net> Date: Wed, 16 Nov 2011 04:57:00 -0000 Message-ID: Subject: Re: RFA: implement ambiguous linespec proposal From: Doug Evans To: Tom Tromey Cc: Jan Kratochvil , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-11/txt/msg00416.txt.bz2 On Mon, Nov 14, 2011 at 1:10 PM, Tom Tromey wrote: >>>>>> "Tom" =3D=3D Tom Tromey writes: > > Tom> Here is a refresh of this patch. =A0This fixes the regressions noted= by > Tom> Jan, but also changes ovsrch.exp not to assume that namespace lookups > Tom> are done. > > Here is the final revision. While your patch didn't introduce the this, I'm wondering if you have thoughts on this. Single vs double quote handling in linespecs is, umm, odd. [It's probably seems odder than it really is due to poor naming, "quote" is just too ambiguous. At some point I'd like to enforce "squote" and "dquote" instead of just "quote" when only one is meant. :-)] E.g., decode_line_internal has this: is_quoted =3D (strchr (get_gdb_completer_quote_characters (), **argptr) !=3D NULL); if (is_quoted) //xxx quoted? what kind of quoted? { end_quote =3D skip_quoted (*argptr); if (*end_quote =3D=3D '\0') is_squote_enclosed =3D 1; //xxx } xxx: We're hardcoding knowledge that get_gdb_completer_quote_characters (emphasis on the plural!) is actually just the single quote '. linespec.c:symtabs_from_filename has this: /* It may have the ending quote right after the file name. */ if ((is_quote_enclosed && copy[p - *argptr - 1] =3D=3D '"') || copy[p - *argptr - 1] =3D=3D '\'') copy[p - *argptr - 1] =3D 0; Why is ' and " treated differently? [I realize the comment for gdb_completer_quote_characters says why *it* doesn't include dquote("), but I'd rather not use it if it makes for clearer code.]