diff options
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/value.c b/gdb/value.c index cb56849eee6..c36f7488a91 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2600,6 +2600,18 @@ value_of_xmethod (struct xmethod_worker *worker) return worker->value; } +/* Return the type of the result of TYPE_CODE_XMETHOD value METHOD. */ + +struct type * +result_type_of_xmethod (struct value *method, int argc, struct value **argv) +{ + gdb_assert (TYPE_CODE (value_type (method)) == TYPE_CODE_XMETHOD + && method->lval == lval_xcallable && argc > 0); + + return get_xmethod_result_type (method->location.xm_worker, + argv[0], argv + 1, argc - 1); +} + /* Call the xmethod corresponding to the TYPE_CODE_XMETHOD value METHOD. */ struct value * |