From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Keith Seitz Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA2] Follow-up decode_line_1 crash Date: Thu, 15 Mar 2001 00:52:00 -0000 Message-id: References: X-SW-Source: 2001-03/msg00217.html On Wed, 14 Mar 2001, Keith Seitz wrote: > *** linespec.c 2000/12/20 14:34:15 2.4 > --- linespec.c 2001/03/14 16:16:11 > *************** decode_line_1 (char **argptr, int funfir > *** 611,620 **** > > s = NULL; > p = *argptr; > ! if (p[0] == '"') > { > is_quote_enclosed = 1; > ! p++; > } > else > is_quote_enclosed = 0; > --- 611,620 ---- > > s = NULL; > p = *argptr; > ! if (**argptr == '"') > { > is_quote_enclosed = 1; > ! (*argptr)++; > } > else > is_quote_enclosed = 0; Can the argument have embedded (escaped) quotes, as in "foo\"bar", in some language? If it can, the search for the next quote is certainly not the right thing to do. One situation where this could happen is when a breakpoint uses the file:line notation, since file names could have embedded quotes.