diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2010-10-19 20:53:15 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2010-10-19 20:53:15 +0000 |
commit | 79afc5ef5d41c629c2e26eee37aaceac4320b8d6 (patch) | |
tree | e5f34b6aea162a5e90b100321fa14c9340a9f287 /gdb/valops.c | |
parent | cca56ac7aecdfc4ba5db742e6505e80d79e28931 (diff) | |
download | gdb-79afc5ef5d41c629c2e26eee37aaceac4320b8d6.zip gdb-79afc5ef5d41c629c2e26eee37aaceac4320b8d6.tar.gz gdb-79afc5ef5d41c629c2e26eee37aaceac4320b8d6.tar.bz2 |
Support overloading of 'operator->'.
2010-10-19 Sami Wagiaalla <swagiaal@redhat.com>
PR C++/11500:
* valarith.c (value_x_unop): Handle STRUCTOP_PTR.
* eval.c (evaluate_subexp_standard): Check for overload of
'operator->'.
* valarith.c (value_x_binop): Throw NOT_FOUND_ERROR.
(value_x_unop): Ditto.
* valops.c: Include "exceptions.h".
(find_overload_match): Throw NOT_FOUND_ERROR.
(value_struct_elt): Ditto.
2010-10-19 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/smartp.exp: New test.
* gdb.cp/smartp.cc : New test.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index fe4576e..07b62a1 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -46,6 +46,7 @@ #include "observer.h" #include "objfiles.h" #include "symtab.h" +#include "exceptions.h" extern int overload_debug; /* Local functions. */ @@ -2215,7 +2216,8 @@ value_struct_elt (struct value **argp, struct value **args, } if (!v) - error (_("Structure has no component named %s."), name); + throw_error (NOT_FOUND_ERROR, + _("Structure has no component named %s."), name); return v; } @@ -2533,7 +2535,9 @@ find_overload_match (struct type **arg_types, int nargs, /* Did we find a match ? */ if (method_oload_champ == -1 && func_oload_champ == -1) - error (_("No symbol \"%s\" in current context."), name); + throw_error (NOT_FOUND_ERROR, + _("No symbol \"%s\" in current context."), + name); /* If we have found both a method match and a function match, find out which one is better, and calculate match |