This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA2] Follow-up decode_line_1 crash
- To: Keith Seitz <keiths at cygnus dot com>
- Subject: Re: [RFA2] Follow-up decode_line_1 crash
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Thu, 15 Mar 2001 10:50:20 +0200 (IST)
- cc: gdb-patches at sources dot redhat dot com
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.