From 7093c834d701edb312386d6953c47c50924a2628 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Mon, 14 Jul 2008 18:28:57 +0000 Subject: Fix for PR gdb/2477 --- gdb/cp-abi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gdb/cp-abi.c') diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c index 6e200ff..250f64b 100644 --- a/gdb/cp-abi.c +++ b/gdb/cp-abi.c @@ -22,6 +22,7 @@ #include "value.h" #include "cp-abi.h" #include "command.h" +#include "exceptions.h" #include "gdbcmd.h" #include "ui-out.h" @@ -89,9 +90,17 @@ value_virtual_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type * value_rtti_type (struct value *v, int *full, int *top, int *using_enc) { + struct type *ret = NULL; + struct gdb_exception e; if ((current_cp_abi.rtti_type) == NULL) return NULL; - return (*current_cp_abi.rtti_type) (v, full, top, using_enc); + TRY_CATCH (e, RETURN_MASK_ERROR) + { + ret = (*current_cp_abi.rtti_type) (v, full, top, using_enc); + } + if (e.reason < 0) + return NULL; + return ret; } void -- cgit v1.1