#include <ctype.h>
+#include "event-top.h"
#include "extract-store-integer.h"
#include "gdbsupport/gdb_regex.h"
#include "frame.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h"
+#include "event-top.h"
#include "gdbtypes.h"
#include "value.h"
#include "c-lang.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <ctype.h>
+#include "event-top.h"
#include "extract-store-integer.h"
#include "gdbtypes.h"
#include "expression.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "gdbsupport/gdb_obstack.h"
#include "addrmap.h"
#include "gdbsupport/selftest.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "osabi.h"
#include "amd64-tdep.h"
#include "arch-utils.h"
#include <ctype.h>
+#include "event-top.h"
#include "hashtab.h"
#include "symtab.h"
#include "frame.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "gdbsupport/gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "value.h"
#include <ctype.h>
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "demangle.h"
#include <signal.h>
#include <fcntl.h>
+#include "event-top.h"
#include "extract-store-integer.h"
#include "inferior.h"
#include "symtab.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
for real. dbx_psymtab_to_symtab() is the function that does this */
+#include "event-top.h"
#include "gdbsupport/gdb_obstack.h"
#include <sys/stat.h>
#include "symtab.h"
/* * Search path for separate debug files. */
extern std::string debug_file_directory;
-/* The current quit handler (and its type). This is called from the
- QUIT macro. See default_quit_handler below for default behavior.
- Parts of GDB temporarily override this to e.g., completely suppress
- Ctrl-C because it would not be safe to throw. E.g., normally, you
- wouldn't want to quit between a RSP command and its response, as
- that would break the communication with the target, but you may
- still want to intercept the Ctrl-C and offer to disconnect if the
- user presses Ctrl-C multiple times while the target is stuck
- waiting for the wedged remote stub. */
-typedef void (quit_handler_ftype) (void);
-extern quit_handler_ftype *quit_handler;
-
-/* The default quit handler. Checks whether Ctrl-C was pressed, and
- if so:
-
- - If GDB owns the terminal, throws a quit exception.
-
- - If GDB does not own the terminal, forwards the Ctrl-C to the
- target.
-*/
-extern void default_quit_handler (void);
-
-/* Flag that function quit should call quit_force. */
-extern volatile bool sync_quit_force_run;
-
-/* Set sync_quit_force_run and also call set_quit_flag(). */
-extern void set_force_quit_flag ();
-
-extern void quit (void);
-
-/* Helper for the QUIT macro. */
-
-extern void maybe_quit (void);
-
-/* Check whether a Ctrl-C was typed, and if so, call the current quit
- handler. */
-#define QUIT maybe_quit ()
-
-/* Set the serial event associated with the quit flag. */
-extern void quit_serial_event_set (void);
-
-/* Clear the serial event associated with the quit flag. */
-extern void quit_serial_event_clear (void);
-
/* * Languages represented in the symbol table and elsewhere.
This should probably be in language.h, but since enum's can't
be forward declared to satisfy opaque references before their
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "event-top.h"
#include "target.h"
#include "value.h"
#include "ui-out.h"
#include "cp-support.h"
#include "c-lang.h"
#include "ada-lang.h"
+#include "event-top.h"
#include "split-name.h"
#include "observable.h"
#include "run-on-main-thread.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "block.h"
+#include "event-top.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "ui-out.h"
#include "value.h"
#include "frame.h"
#include "cli/cli-cmds.h"
#include "complaints.h"
#include "dwz.h"
+#include "event-top.h"
#include "gdb/gdb-index.h"
#include "gdbsupport/gdb-checked-static-cast.h"
#include "mapped-index.h"
#include "dwarf2/public.h"
#include "bfd.h"
#include "elf-bfd.h"
+#include "event-top.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "objfiles.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "gdbsupport/job-control.h"
+#include "run-on-main-thread.h"
#include "top.h"
#include "ui.h"
#include "inferior.h"
install_handle_sigsegv ();
}
-/* See defs.h. */
+/* See event-top.h. */
void
-quit_serial_event_set (void)
+quit (void)
+{
+ if (sync_quit_force_run)
+ {
+ sync_quit_force_run = false;
+ throw_forced_quit ("SIGTERM");
+ }
+
+#ifdef __MSDOS__
+ /* No steenking SIGINT will ever be coming our way when the
+ program is resumed. Don't lie. */
+ throw_quit ("Quit");
+#else
+ if (job_control
+ /* If there is no terminal switching for this target, then we can't
+ possibly get screwed by the lack of job control. */
+ || !target_supports_terminal_ours ())
+ throw_quit ("Quit");
+ else
+ throw_quit ("Quit (expect signal SIGINT when the program is resumed)");
+#endif
+}
+
+/* See event-top.h. */
+
+void
+maybe_quit ()
+{
+ if (!is_main_thread ())
+ return;
+
+ if (sync_quit_force_run)
+ quit ();
+
+ quit_handler ();
+}
+
+/* See event-top.h. */
+
+void
+quit_serial_event_set ()
{
serial_event_set (quit_serial_event);
}
-/* See defs.h. */
+/* See event-top.h. */
void
quit_serial_event_clear (void)
struct cmd_list_element;
+/* The current quit handler (and its type). This is called from the
+ QUIT macro. See default_quit_handler below for default behavior.
+ Parts of GDB temporarily override this to e.g., completely suppress
+ Ctrl-C because it would not be safe to throw. E.g., normally, you
+ wouldn't want to quit between a RSP command and its response, as
+ that would break the communication with the target, but you may
+ still want to intercept the Ctrl-C and offer to disconnect if the
+ user presses Ctrl-C multiple times while the target is stuck
+ waiting for the wedged remote stub. */
+typedef void (quit_handler_ftype) ();
+extern quit_handler_ftype *quit_handler;
+
/* Exported functions from event-top.c.
FIXME: these should really go into top.h. */
+/* The default quit handler. Checks whether Ctrl-C was pressed, and
+ if so:
+
+ - If GDB owns the terminal, throws a quit exception.
+
+ - If GDB does not own the terminal, forwards the Ctrl-C to the
+ target.
+*/
+
+extern void default_quit_handler ();
+
+/* Flag that function quit should call quit_force. */
+
+extern volatile bool sync_quit_force_run;
+
+/* Set sync_quit_force_run and also call set_quit_flag(). */
+
+extern void set_force_quit_flag ();
+
+/* Control C eventually causes this to be called, at a convenient time. */
+
+extern void quit ();
+
+/* Helper for the QUIT macro. */
+
+extern void maybe_quit ();
+
+/* Check whether a Ctrl-C was typed, and if so, call the current quit
+ handler. */
+
+#define QUIT maybe_quit ()
+
+/* Set the serial event associated with the quit flag. */
+
+extern void quit_serial_event_set ();
+
+/* Clear the serial event associated with the quit flag. */
+
+extern void quit_serial_event_clear ();
+
extern void display_gdb_prompt (const char *new_prompt);
extern void gdb_setup_readline (int);
extern void gdb_disable_readline (void);
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "gdbsupport/gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "frame.h"
+#include "event-top.h"
#include "extract-store-integer.h"
#include "target.h"
#include "value.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "gdb_bfd.h"
+#include "event-top.h"
#include "ui-out.h"
#include "gdbcmd.h"
#include "hashtab.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "event-top.h"
#include "inferior.h"
#include "infrun.h"
#include "regcache.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "language.h"
#include "gdbsupport/gdb_obstack.h"
#include "bfd.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "target.h"
#include "frame.h"
#include "value.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
/* This file is derived from c-lang.c */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
/* This file is derived from p-typeprint.c */
+#include "event-top.h"
#include "gdbsupport/gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "frame.h"
#include "symtab.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "symtab.h"
#include "objfiles.h"
#include "psymtab.h"
/* See the GDB User Guide for details of the GDB remote protocol. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "gdbcmd.h"
#include "remote.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "gdb_bfd.h"
#include "inferior.h"
#include "infrun.h"
#include "charset.h"
#include "cp-support.h"
#include "demangle.h"
+#include "event-top.h"
#include "gdbarch.h"
#include "infcall.h"
#include "objfiles.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "serial.h"
#include "ser-base.h"
#include "gdbsupport/event-loop.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "skip.h"
+#include "event-top.h"
#include "value.h"
#include "valprint.h"
#include "ui-out.h"
#include "arch-utils.h"
#include "elf-bfd.h"
#include "elf/amdgpu.h"
+#include "event-top.h"
#include "gdbsupport/fileio.h"
#include "inferior.h"
#include "observable.h"
#include "arch-utils.h"
#include "dwarf2/frame.h"
+#include "event-top.h"
#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
this file. */
#include "bfd.h"
+#include "event-top.h"
#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "value.h"
#include "symtab.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "bfd.h"
#include "dwarf2/call-site.h"
#include "symtab.h"
+#include "event-top.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "frame.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "event-top.h"
#include "symtab.h"
#include "frame.h"
#include "gdbtypes.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "gdbcmd.h"
#include "tui/tui.h"
#include "tui/tui-hooks.h"
safe_strerror (saved_errno));
}
-/* Control C eventually causes this to be called, at a convenient time. */
-
-void
-quit (void)
-{
- if (sync_quit_force_run)
- {
- sync_quit_force_run = false;
- throw_forced_quit ("SIGTERM");
- }
-
-#ifdef __MSDOS__
- /* No steenking SIGINT will ever be coming our way when the
- program is resumed. Don't lie. */
- throw_quit ("Quit");
-#else
- if (job_control
- /* If there is no terminal switching for this target, then we can't
- possibly get screwed by the lack of job control. */
- || !target_supports_terminal_ours ())
- throw_quit ("Quit");
- else
- throw_quit ("Quit (expect signal SIGINT when the program is resumed)");
-#endif
-}
-
-/* See defs.h. */
-
-void
-maybe_quit (void)
-{
- if (!is_main_thread ())
- return;
-
- if (sync_quit_force_run)
- quit ();
-
- quit_handler ();
-}
-
-\f
/* Called when a memory allocation fails, with the number of bytes of
memory requested in SIZE. */
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "event-top.h"
#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h"
+#include "event-top.h"
#include <sys/types.h>
#include <fcntl.h>