diff options
author | Tom Tromey <tromey@redhat.com> | 2010-03-18 18:02:00 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-03-18 18:02:00 +0000 |
commit | 40c549d6006296af1f9914078b1a73a38ea3b9df (patch) | |
tree | 76d24468cfa1b1844c7ed37215842750d4e11cc4 /gdb/infcmd.c | |
parent | b115cf96d30141e7694bb322f30644d4667495c6 (diff) | |
download | gdb-40c549d6006296af1f9914078b1a73a38ea3b9df.zip gdb-40c549d6006296af1f9914078b1a73a38ea3b9df.tar.gz gdb-40c549d6006296af1f9914078b1a73a38ea3b9df.tar.bz2 |
* infcmd.c (finish_command_continuation): Wrap print_return_value
in TRY_CATCH.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index e2235db..174acde 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1439,7 +1439,19 @@ finish_command_continuation (void *arg) _("finish_command: function has no target type")); if (TYPE_CODE (value_type) != TYPE_CODE_VOID) - print_return_value (SYMBOL_TYPE (a->function), value_type); + { + volatile struct gdb_exception ex; + + TRY_CATCH (ex, RETURN_MASK_ALL) + { + /* print_return_value can throw an exception in some + circumstances. We need to catch this so that we still + delete the breakpoint. */ + print_return_value (SYMBOL_TYPE (a->function), value_type); + } + if (ex.reason < 0) + exception_print (gdb_stdout, ex); + } } /* We suppress normal call of normal_stop observer and do it here so |