From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: extend symtabs_from_filename skipping for C++
Date: Wed, 08 Feb 2012 22:06:00 -0000 [thread overview]
Message-ID: <20120208220543.GB19247@adacore.com> (raw)
In-Reply-To: <m3aa4taxyg.fsf@fleche.redhat.com>
> 2012-02-08 Tom Tromey <tromey@redhat.com>
>
> * 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
next prev parent reply other threads:[~2012-02-08 22:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 20:10 Tom Tromey
2012-02-08 22:06 ` Joel Brobecker [this message]
2012-02-10 13:34 ` Jan Kratochvil
2012-02-10 17:30 ` Tom Tromey
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=20120208220543.GB19247@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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