aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-02-10 17:31:34 +0000
committerTom Tromey <tromey@redhat.com>2012-02-10 17:31:34 +0000
commitff3c9849a7e7bb050e555e5185307cc585874008 (patch)
treeaad884e71e8c5c684de1511d1cfad2977411d829 /gdb
parent4a2d9c0801c95eafe989a6104bb06cdf376779ba (diff)
downloadgdb-ff3c9849a7e7bb050e555e5185307cc585874008.zip
gdb-ff3c9849a7e7bb050e555e5185307cc585874008.tar.gz
gdb-ff3c9849a7e7bb050e555e5185307cc585874008.tar.bz2
* linespec.c (decode_line_internal): Skip symtabs_from_filename
when we have a C++ qualified name.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/linespec.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 41c32b9..8467263 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-10 Tom Tromey <tromey@redhat.com>
+
+ * linespec.c (decode_line_internal): Skip symtabs_from_filename
+ when we have a C++ qualified name.
+
2012-02-10 Pedro Alves <palves@redhat.com>
* inferior.c (inferior_pid_to_str): New.
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 109c7d2..94e8ef6 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)
{