aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorgdb-3.4 <gdb@fsf.org>1989-11-05 21:02:37 +0000
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:32 +0100
commit1c997a4ae86938343edb715efc3fc742c5f668fe (patch)
tree9e3c70728a3987732436b7fa4b4cfef433a0669a /gdb/symtab.c
parent4187119d59afd156703cfcbc6be287c5085f1867 (diff)
downloadgdb-1c997a4ae86938343edb715efc3fc742c5f668fe.zip
gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.gz
gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.bz2
gdb-3.4
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a8108d8..2b4dfb7 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1567,7 +1567,13 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
that depends on knowing the name of D. */
if (class_name)
{
- while (*class_name++ != ' ');
+ /* We just want the class name. In the context
+ of C++, stripping off "struct " is always
+ sensible. */
+ if (strncmp("struct ", class_name, 7) == 0)
+ class_name += 7;
+ if (strncmp("union ", class_name, 6) == 0)
+ class_name += 6;
sym_class = lookup_symbol (class_name, 0, STRUCT_NAMESPACE, 0);
for (method_counter = TYPE_NFN_FIELDS (SYMBOL_TYPE (sym_class)) - 1;