summaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 9804a977f7b..6bbd495990c 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1742,6 +1742,15 @@ evaluate_subexp_standard (struct type *expect_type,
return value_zero (builtin_type (exp->gdbarch)->builtin_int,
not_lval);
}
+ else if (TYPE_CODE (ftype) == TYPE_CODE_XMETHOD)
+ {
+ struct type *return_type
+ = result_type_of_xmethod (argvec[0], nargs, argvec + 1);
+
+ if (return_type == NULL)
+ error (_("Xmethod is missing return type."));
+ return value_zero (return_type, not_lval);
+ }
else if (TYPE_GNU_IFUNC (ftype))
return allocate_value (TYPE_TARGET_TYPE (TYPE_TARGET_TYPE (ftype)));
else if (TYPE_TARGET_TYPE (ftype))