diff options
author | Tom Tromey <tromey@redhat.com> | 2012-02-10 17:31:33 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-02-10 17:31:33 +0000 |
commit | a123fc5e68ab8e36b52317454c0b46fbd288183d (patch) | |
tree | 7637b7ea62d557404a32a1cb1b35a19f62438764 /gdb/linespec.c | |
parent | e5bc90636b77526f35057d282c3e44dc41ed4b1f (diff) | |
download | gdb-a123fc5e68ab8e36b52317454c0b46fbd288183d.tar.gz |
* linespec.c (decode_line_internal): Skip symtabs_from_filename
when we have a C++ qualified name.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index 109c7d2157c..94e8ef687d2 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[0] == ':' && p[1] == ':')) { TRY_CATCH (file_exception, RETURN_MASK_ERROR) { |