aboutsummaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-09-21 15:21:28 +0000
committerJoseph Myers <joseph@codesourcery.com>2011-09-21 15:21:28 +0000
commitb2cd6b294833b0dd0d5b913580fa7e5a72565b41 (patch)
tree21a7a46c8c5cf7ea3612373589a4ca4a441dfa28 /gdb/event-top.c
parent09b4ad9fcbb1a946df939adeb373d1be0e701694 (diff)
downloadgdb-b2cd6b294833b0dd0d5b913580fa7e5a72565b41.zip
gdb-b2cd6b294833b0dd0d5b913580fa7e5a72565b41.tar.gz
gdb-b2cd6b294833b0dd0d5b913580fa7e5a72565b41.tar.bz2
* 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.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index ff2aefb..a276690 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);
}