Replace "exec" with "executable" in messages.
[deliverable/binutils-gdb.git] / gdb / top.c
index 6777d0b7993d100428ab185f36ee4f91d0baa902..d666f43d94d5a661c88809b416f1c7314c700f70 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1,5 +1,5 @@
 /* Top level stuff for GDB, the GNU debugger.
-   Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 1997
+   Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 1998
    Free Software Foundation, Inc.
 
 This file is part of GDB.
@@ -379,6 +379,9 @@ static void stop_sig PARAMS ((int));
    command file.  */
 
 void (*init_ui_hook) PARAMS ((char *argv0));
+#ifdef __CYGWIN32__
+void (*ui_loop_hook) PARAMS ((int));
+#endif
 
 /* Called instead of command_loop at top level.  Can be invoked via
    return_to_top_level.  */
@@ -403,6 +406,10 @@ void (*print_frame_info_listing_hook) PARAMS ((struct symtab *s, int line,
 
 int (*query_hook) PARAMS ((const char *, va_list));
 
+/* Replaces most of warning.  */
+
+void (*warning_hook) PARAMS ((const char *, va_list));
+
 /* Called from gdb_flush to flush output.  */
 
 void (*flush_hook) PARAMS ((FILE *stream));
@@ -439,6 +446,9 @@ void (*interactive_hook) PARAMS ((void));
 
 void (*registers_changed_hook) PARAMS ((void));
 
+/* tell the GUI someone changed the PC */
+void (*pc_changed_hook) PARAMS ((void));
+
 /* Called when going to wait for the target.  Usually allows the GUI to run
    while waiting for target events.  */
 
@@ -450,6 +460,9 @@ int (*target_wait_hook) PARAMS ((int pid, struct target_waitstatus *status));
 void (*call_command_hook) PARAMS ((struct cmd_list_element *c, char *cmd,
                                   int from_tty));
 
+/* Called when the current thread changes.  Argument is thread id.  */
+
+void (*context_hook) PARAMS ((int id));
 
 /* Takes control from error ().  Typically used to prevent longjmps out of the
    middle of the GUI.  Usually used in conjunction with a catch routine.  */
@@ -1914,6 +1927,13 @@ static void
 do_nothing (signo)
 int signo;
 {
+  /* Under System V the default disposition of a signal is reinstated after
+     the signal is caught and delivered to an application process.  On such
+     systems one must restore the replacement signal handler if one wishes
+     to continue handling the signal in one's program.  On BSD systems this
+     is not needed but it is harmless, and it simplifies the code to just do
+     it unconditionally. */
+  signal (signo, do_nothing);
 }
 
 static void
@@ -2803,7 +2823,7 @@ print_gdb_version (stream)
 
   /* Second line is a copyright notice. */
 
-  fprintf_filtered (stream, "Copyright 1997 Free Software Foundation, Inc.\n");
+  fprintf_filtered (stream, "Copyright 1998 Free Software Foundation, Inc.\n");
 
   /* Following the copyright is a brief statement that the program is
      free software, that users are free to copy and change it on
@@ -2813,8 +2833,8 @@ print_gdb_version (stream)
   fprintf_filtered (stream, "\
 GDB is free software, covered by the GNU General Public License, and you are\n\
 welcome to change it and/or distribute copies of it under certain conditions.\n\
-Type \"show copying\" to see the conditions.  This version of GDB is supported  This version of GDB is supported\n\
-for customers of Cygnus Solutions.  Type \"show warranty\" for details.\n");
+Type \"show copying\" to see the conditions.\n\
+There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n");
 
   /* After the required info we print the configuration information. */
 
@@ -2870,7 +2890,12 @@ quit_confirm ()
     {
       char *s;
 
-      if (attach_flag)
+      /* This is something of a hack.  But there's no reliable way to
+        see if a GUI is running.  The `use_windows' variable doesn't
+        cut it.  */
+      if (init_ui_hook)
+       s = "A debugging session is active.\nDo you still want to close the debugger?";
+      else if (attach_flag)
        s = "The program is running.  Quit anyway (and detach it)? ";
       else
        s = "The program is running.  Exit anyway? ";
This page took 0.024726 seconds and 4 git commands to generate.