From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26121 invoked by alias); 10 May 2002 01:27:38 -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 26109 invoked from network); 10 May 2002 01:27:36 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 10 May 2002 01:27:36 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 175zC4-0004Xr-00; Thu, 09 May 2002 21:27:36 -0400 Date: Thu, 09 May 2002 18:27:00 -0000 From: Daniel Jacobowitz To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] linespec.c old patch Message-ID: <20020510012736.GA17450@nevyn.them.org> Mail-Followup-To: Elena Zannoni , gdb-patches@sources.redhat.com References: <15579.5116.246506.98715@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15579.5116.246506.98715@localhost.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-05/txt/msg00313.txt.bz2 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 > > From Daniel Berlin > * 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. */ > + > 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