diff options
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r-- | gdb/gnu-v3-abi.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index d1ed8fc..5c04011 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -904,8 +904,8 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, { /* Initialize it just to avoid a GCC false warning. */ CORE_ADDR addr = 0; + int got_error = 0; struct value *vfn; - volatile struct gdb_exception ex; printf_filtered ("[%d]: ", i); @@ -916,13 +916,18 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, if (gdbarch_vtable_function_descriptors (gdbarch)) vfn = value_addr (vfn); - TRY_CATCH (ex, RETURN_MASK_ERROR) + TRY { addr = value_as_address (vfn); } - if (ex.reason < 0) - printf_filtered (_("<error: %s>"), ex.message); - else + CATCH (ex, RETURN_MASK_ERROR) + { + printf_filtered (_("<error: %s>"), ex.message); + got_error = 1; + } + END_CATCH + + if (!got_error) print_function_pointer_address (opts, gdbarch, addr, gdb_stdout); printf_filtered ("\n"); } |