From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26449 invoked by alias); 3 Apr 2002 15:58:29 -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 26438 invoked from network); 3 Apr 2002 15:58:26 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 3 Apr 2002 15:58:26 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id g33FwO705749; Wed, 3 Apr 2002 09:58:24 -0600 Date: Wed, 03 Apr 2002 07:58:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200204031558.g33FwO705749@duracef.shout.net> To: drow@mvista.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix mi-break.exp: 'b "basics.c":16' X-SW-Source: 2002-04/txt/msg00067.txt.bz2 I have a question about this linespec patch. After I apply the patch, decode_line_1 looks like this: /* Extract the file name. */ p1 = p; while (p != *argptr && p[-1] == ' ') --p; if ((*p == '"') && is_quote_enclosed) --p; copy = (char *) alloca (p - *argptr + 1); memcpy (copy, *argptr, p - *argptr); /* It may have the ending quote right after the file name */ if (is_quote_enclosed && copy[p - *argptr - 1] == '"') copy[p - *argptr - 1] = 0; else copy[p - *argptr] = 0; If there is a '"' at the end, then it won't be copied into "copy". So these lines look redundant to me: if (is_quote_enclosed && copy[p - *argptr - 1] == '"') copy[p - *argptr - 1] = 0; Or maybe I am missing something, such as nested quotes? Michael C 2002-04-02 Daniel Jacobowitz * linespec.c (decode_line_1): Check for a double quote after a filename correctly.