aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-abi.c
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2008-07-14 18:28:57 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2008-07-14 18:28:57 +0000
commit7093c834d701edb312386d6953c47c50924a2628 (patch)
tree55141ad44cc3308fbd2546024b55d1da61ea8db1 /gdb/cp-abi.c
parent5651477109e89a1a78c5c28cfac55c6141000754 (diff)
downloadgdb-7093c834d701edb312386d6953c47c50924a2628.zip
gdb-7093c834d701edb312386d6953c47c50924a2628.tar.gz
gdb-7093c834d701edb312386d6953c47c50924a2628.tar.bz2
Fix for PR gdb/2477
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 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