/* Top level stuff for GDB, the GNU debugger.
- Copyright (C) 1999-2019 Free Software Foundation, Inc.
+ Copyright (C) 1999-2020 Free Software Foundation, Inc.
Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
#include "infrun.h"
#include "target.h"
#include "terminal.h"
-#include "event-loop.h"
+#include "gdbsupport/event-loop.h"
#include "event-top.h"
#include "interps.h"
#include <signal.h>
#include "maint.h"
#include "gdbsupport/buffer.h"
#include "ser-event.h"
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
#include "gdbsupport/gdb-sigmask.h"
+#include "async-event.h"
/* readline include files. */
#include "readline/readline.h"
/* Don't use a _filtered function here. It causes the assumed
character position to be off, since the newline we read from
the user is not accounted for. */
- fputs_unfiltered (actual_gdb_prompt.c_str (), gdb_stdout);
+ fprintf_unfiltered (gdb_stdout, "%s", actual_gdb_prompt.c_str ());
gdb_flush (gdb_stdout);
}
}
install_handle_sigsegv ();
if (thread_local_segv_handler == nullptr)
- abort ();
+ abort (); /* ARI: abort */
thread_local_segv_handler (sig);
}
exception_print (gdb_stderr, exception);
}
- try
- {
- pop_all_targets ();
- }
- catch (const gdb_exception &exception)
+ for (inferior *inf : all_inferiors ())
{
+ switch_to_inferior_no_thread (inf);
+ try
+ {
+ pop_all_targets ();
+ }
+ catch (const gdb_exception &exception)
+ {
+ }
}
signal (SIGHUP, SIG_DFL); /*FIXME: ??????????? */