From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11801 invoked by alias); 14 Oct 2002 21:33:32 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11794 invoked from network); 14 Oct 2002 21:33:32 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by sources.redhat.com with SMTP; 14 Oct 2002 21:33:32 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.11.3/8.11.3) with ESMTP id g9ELXVi21022 for ; Mon, 14 Oct 2002 14:33:31 -0700 (PDT) Received: from scv1.apple.com (scv1.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.5) with ESMTP id ; Mon, 14 Oct 2002 14:33:20 -0700 Received: from molly.local. (vpn-scv-x4-219.apple.com [17.219.194.219]) by scv1.apple.com (8.11.3/8.11.3) with ESMTP id g9ELXUr29249; Mon, 14 Oct 2002 14:33:30 -0700 (PDT) Date: Mon, 14 Oct 2002 14:33:00 -0000 Subject: Re: [PATCH] Redefine skip_quoted Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v543) Cc: Michael Snyder , Adam Fedor , gdb-patches@sources.redhat.com To: Jim Blandy From: Klee Dienes In-Reply-To: Message-Id: <95706CBA-DFBC-11D6-A1B6-00039396EEB8@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00264.txt.bz2 In the Apple code, we use skip_quoted to allow for the possibility of spaces in Objective-C function names. I'm actually coming to think that allowing people to break on unquoted Objective-C methods was a mistake: it's caused us no end of trouble trying to shoehorn decode_line_1() into handling every possible edge-case. I'm not sure how practical it is for us to remove it at this point, though --- we'd have to do some research among our Objective-C developers to find out how important a feature it is to them, I think. Here's the appropriate diff from our linespec.c: diff -u -r1.1.1.10 -r1.17 --- linespec.c 2002/09/26 20:57:05 1.1.1.10 +++ linespec.c 2002/09/26 22:19:22 1.17 @@ -1094,10 +1245,15 @@ } else if (is_quoted) { - p = skip_quoted (*argptr); + /* allow word separators in function names for Obj-C */ + p = skip_quoted (*argptr, ""); if (p[-1] != '\'') error ("Unmatched single quote."); } @@ -1105,9 +1261,10 @@ } else { - p = skip_quoted (*argptr); + /* allow word separators in function names for Obj-C */ + p = skip_quoted (*argptr, ""); } copy = (char *) alloca (p - *argptr + 1); On Monday, October 14, 2002, at 04:29 PM, Jim Blandy wrote: > > I don't understand the purpose of this patch. > > Instead of havingb skip_quoted use gdb_completer_word_break_characters > directly, it adds an argument to skip_quoted, and then passes the > return value from get_gdb_completer_word_break_characters () in every > case. But the Objective-C case does exactly the same thing as all the > other cases; it doesn't behave any differently. > > Is this some sort of preparatory patch for something else? What's > coming down the line? > > Michael Snyder writes: > >> Adam Fedor wrote: >>> >>> Objective-C has a different idea of what word break characters are. >>> Hence this patch (although the new usage isn't actually apparent in >>> this >>> patch). >> >> I think you need Jim or Elena's buy-in for the change in linespec.c, >> but I'll approve the rest. Jim, Elena's on vacation -- can you give >> a quick look at this? >> >>> >>> 2002-10-04 Adam Fedor >>> >>> * Makefile.in (c-exp.tab.o): Add $(completer_h) to >>> dependancies. >>> (jv-exp.tarb.o): Likewise. >>> (p-exp.tab.o): Likewise. >>> * completer.c (skip_quoted): Take additional "word break >>> characters" argument. >>> * completer.h: Update definition of skip_quoted. >>> * defs.h (skip_quoted): Delete, declared in completer.h. >>> * c-exp.y: Include completer.h. Update definition of >>> skip_quoted. >>> * p-exp.y: Likewise. >>> * jv-exp.y: Likewise. >>> * linespec.c (decode_line_1): Likewise.