* event-top.c (async_disconnect): If an exception is thrown from
[deliverable/binutils-gdb.git] / gdb / event-top.c
index ff2aefbc4578d43a2a674c210b02c0e1109e536a..a2766906e46c8b7c03487d60654b713cb5392b4a 100644 (file)
@@ -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);
 }
This page took 0.022962 seconds and 4 git commands to generate.