summaryrefslogtreecommitdiff
path: root/gdb/cp-abi.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cp-abi.c')
-rw-r--r--gdb/cp-abi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c
index 6e200ff6385..250f64b35e4 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