/* Top level stuff for GDB, the GNU debugger.
- Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2004-2005, 2007-2012 Free Software
+ Foundation, Inc.
Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
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);
}