aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-11-12 22:20:02 +0000
committerPer Bothner <per@bothner.com>1991-11-12 22:20:02 +0000
commit0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec (patch)
tree3ba6589b103df25eeaab1de54754fbe0f5cbea36 /gdb/symtab.c
parent5f12485297f7f829c0c035657197ce1de09a10cd (diff)
downloadgdb-0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec.zip
gdb-0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec.tar.gz
gdb-0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec.tar.bz2
Fixes related to handling of C++ methods (handle destructors
and parameters that are functions).
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c20
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