diff options
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 709559c..9d4db8f 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1270,6 +1270,18 @@ lookup_partial_symbol (pst, name, global, namespace) return (struct partial_symbol *) 0; } +/* Find the psymtab containing main(). */ + +struct partial_symtab * +find_main_psymtab () +{ + register struct partial_symtab *pst; + for (pst = partial_symtab_list; pst; pst = pst->next) + if (lookup_partial_symbol (pst, "main", 1, VAR_NAMESPACE)) + return pst; + return NULL; +} + /* Look for a symbol in block BLOCK. */ struct symbol * @@ -1930,7 +1942,6 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line) } while (p[0] == ' ' || p[0] == '\t') p++; - q = operator_chars (*argptr, &q1); if (p[0] == ':') { @@ -2043,7 +2054,12 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line) } else tmp = copy; - error ("that class does not have any method named %s", tmp); + if (tmp[0] == '~') + error ("The class `%s' does not have destructor defined", + sym_class->name); + else + error ("The class %s does not have any method named %s", + sym_class->name, tmp); } } else |