From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 488 invoked by alias); 8 Feb 2012 22:06:02 -0000 Received: (qmail 475 invoked by uid 22791); 8 Feb 2012 22:06:00 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Feb 2012 22:05:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F24711C6545; Wed, 8 Feb 2012 17:05:46 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id S0vRSfMVL+Da; Wed, 8 Feb 2012 17:05:46 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B8DEA1C6531; Wed, 8 Feb 2012 17:05:46 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 1118B145615; Thu, 9 Feb 2012 02:05:43 +0400 (RET) Date: Wed, 08 Feb 2012 22:06:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: extend symtabs_from_filename skipping for C++ Message-ID: <20120208220543.GB19247@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00116.txt.bz2 > 2012-02-08 Tom Tromey > > * linespec.c (decode_line_internal): Skip symtabs_from_filename > when we have a C++ qualified name. FWIW, I don't see a problem with this enhancement. > diff --git a/gdb/linespec.c b/gdb/linespec.c > index da88d17..3f53b8e 100644 > --- a/gdb/linespec.c > +++ b/gdb/linespec.c > @@ -912,9 +912,11 @@ decode_line_internal (struct linespec_state *self, char **argptr) > /* First things first: if ARGPTR starts with a filename, get its > symtab and strip the filename from ARGPTR. > Avoid calling symtab_from_filename if we know can, > - it can be expensive. */ > + it can be expensive. We know we can avoid the call if we see a > + single word (e.g., "break NAME") or if we see a qualified C++ > + name ("break QUAL::NAME"). */ > > - if (*p != '\0') > + if (*p != '\0' && p[1] != ':') > { > TRY_CATCH (file_exception, RETURN_MASK_ERROR) > { -- Joel