diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2011-09-21 15:21:25 +0000 |
---|---|---|
committer | Joseph Myers <jsm@polyomino.org.uk> | 2011-09-21 15:21:25 +0000 |
commit | 42b0a89ba60936910216f803670c75a3585fcc66 (patch) | |
tree | c2853f8e71450733807dcf7ecd50d0c6ba32f074 /gdb/event-top.c | |
parent | a3086f1764d548cc8e727be83799e51097beaf54 (diff) | |
download | gdb-42b0a89ba60936910216f803670c75a3585fcc66.tar.gz |
* event-top.c (async_disconnect): If an exception is thrown from
quit_cover, call pop_all_targets. Use TRY_CATCH instead of
catch_errors.
* top.c (quit_cover): Return void and take no arguments.
* top.h (quit_cover): Update prototype.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r-- | gdb/event-top.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c index ff2aefbc457..a2766906e46 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -870,9 +870,25 @@ handle_sighup (int sig) static void async_disconnect (gdb_client_data arg) { - catch_errors (quit_cover, NULL, - "Could not kill the program being debugged", - RETURN_MASK_ALL); + volatile struct gdb_exception exception; + + TRY_CATCH (exception, RETURN_MASK_ALL) + { + quit_cover (); + } + + if (exception.reason < 0) + { + fputs_filtered ("Could not kill the program being debugged", + gdb_stderr); + exception_print (gdb_stderr, exception); + } + + TRY_CATCH (exception, RETURN_MASK_ALL) + { + pop_all_targets (1); + } + signal (SIGHUP, SIG_DFL); /*FIXME: ??????????? */ raise (SIGHUP); } |