Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] linespec.c old patch
Date: Thu, 09 May 2002 18:27:00 -0000	[thread overview]
Message-ID: <20020510012736.GA17450@nevyn.them.org> (raw)
In-Reply-To: <15579.5116.246506.98715@localhost.redhat.com>

On Thu, May 09, 2002 at 08:27:40PM -0400, Elena Zannoni wrote:
> 
> This patch was approved but never got applied.
> I am committing it now. DanJ, OK with you?
> 
> http://sources.redhat.com/ml/gdb-patches/2001-05/msg00417.html

Looks good to me.

> 
> Elena
> 
> 2002-05-09  Elena Zannoni  <ezannoni@redhat.com>
>   
> 	From Daniel Berlin <dan@cgsoftware.com> 
> 	* linespec.c (find_toplevel_char): '<' and '>' also increase and
> 	decrease the depth we are at, in the case of templates.
> 
> Index: linespec.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/linespec.c,v
> retrieving revision 1.18
> diff -u -p -r1.18 linespec.c
> --- linespec.c	5 Apr 2002 22:04:41 -0000	1.18
> +++ linespec.c	10 May 2002 00:23:43 -0000
> @@ -298,7 +298,9 @@ build_canonical_line_spec (struct symtab
>  
>  /* Find an instance of the character C in the string S that is outside
>     of all parenthesis pairs, single-quoted strings, and double-quoted
> -   strings.  */
> +   strings.  Also, ignore the char within a template name, like a ','
> +   within foo<int, int>.  */
> +
>  static char *
>  find_toplevel_char (char *s, char c)
>  {
> @@ -321,9 +323,9 @@ find_toplevel_char (char *s, char c)
>  	return scan;
>        else if (*scan == '"' || *scan == '\'')
>  	quoted = *scan;
> -      else if (*scan == '(')
> +      else if (*scan == '(' || *scan == '<')
>  	depth++;
> -      else if (*scan == ')' && depth > 0)
> +      else if ((*scan == ')' || *scan == '>') && depth > 0)
>  	depth--;
>      }
> 

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


      reply	other threads:[~2002-05-10  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-09 17:28 Elena Zannoni
2002-05-09 18:27 ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020510012736.GA17450@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox