Remove kill_inferior_fast, in favor of target_kill, which goes
authorJohn Gilmore <gnu@cygnus>
Tue, 22 Sep 1992 05:23:57 +0000 (05:23 +0000)
committerJohn Gilmore <gnu@cygnus>
Tue, 22 Sep 1992 05:23:57 +0000 (05:23 +0000)
through the target vector.

* inferior.h (kill_inferior_fast): remove declaration.

* main.c (disconnect): call quit_cover using catch_errors rather
than calling kill_inferior_fast directly.  New way goes through
the target vector, handles attached processes, and writes
command history if appropriate.
(quit_cover): new function, wrapper for quit_command.

* convex-xdep.c, go32-xdep.c, hppabsd-xdep.c, hppahpux-xdep.c,
infptrace.c, procfs.c:  Removed all instances of kill_inferior_fast,
inlining them into the local kill_inferior when needed.

gdb/ChangeLog
gdb/convex-xdep.c
gdb/go32-xdep.c
gdb/hppabsd-xdep.c
gdb/hppahpux-xdep.c
gdb/procfs.c

index cd1108f..27276ef 100644 (file)
@@ -1,3 +1,20 @@
+Mon Sep 21 19:43:13 1992  John Gilmore and K. Richard Pixley (gnu@cygnus.com)
+
+       Remove kill_inferior_fast, in favor of target_kill, which goes
+       through the target vector.
+
+       * inferior.h (kill_inferior_fast): remove declaration.
+
+       * main.c (disconnect): call quit_cover using catch_errors rather
+       than calling kill_inferior_fast directly.  New way goes through
+       the target vector, handles attached processes, and writes
+       command history if appropriate.
+       (quit_cover): new function, wrapper for quit_command.
+
+       * convex-xdep.c, go32-xdep.c, hppabsd-xdep.c, hppahpux-xdep.c,
+       infptrace.c, procfs.c:  Removed all instances of kill_inferior_fast,
+       inlining them into the local kill_inferior when needed.
+
 Mon Sep 21 19:23:05 1992  John Gilmore  (gnu@cygnus.com)
 
        * infrun.c (_initialize_infrun):  Alias `i handle' == `i signals'.
index ba4da80..8282b30 100644 (file)
@@ -1,5 +1,5 @@
-/* Convex stuff for GDB.
-   Copyright (C) 1990-1991 Free Software Foundation, Inc.
+/* Convex host-dependent code for GDB.
+   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -383,16 +383,6 @@ kill_inferior ()
   target_mourn_inferior ();
 }
 
-/* This is used when GDB is exiting.  It gives less chance of error.*/
-
-kill_inferior_fast ()
-{
-  if (inferior_pid == 0)
-    return;
-  ioctl (inferior_fd, PIXTERMINATE, 0);
-  wait (0);
-}
-
 /* Read vector register REG, and return a pointer to the value.  */
 
 static long *
index a929940..b546121 100644 (file)
@@ -1,6 +1,5 @@
 /* Host-dependent code for dos running GO32 for GDB, the GNU debugger.
-   Copyright 1992
-   Free Software Foundation, Inc.
+   Copyright 1992 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -30,7 +29,6 @@ fork(){uerror("attempt to call fork()");}
 vfork(){uerror("attempt to call vfork()");}
 wait(){uerror("attempt to call wait()");}
 execlp(){uerror("attempt to call execlp()");}
-kill_inferior_fast(){uerror("attempt to call kill_inferior_fast()");}
 kill_inferior(){uerror("attempt to call kill_inferior()");}
 re_comp(){uerror("attempt to call re_comp()");}
 re_exec(){uerror("attempt to call re_exec()");}
index 7e9d4f4..bec14c4 100644 (file)
@@ -72,21 +72,13 @@ call_ptrace (request, pid, addr, data)
 #define ptrace call_ptrace
 #endif
 
-/* This is used when GDB is exiting.  It gives less chance of error.*/
-
 void
-kill_inferior_fast ()
+kill_inferior ()
 {
   if (inferior_pid == 0)
     return;
   ptrace (PT_KILL, inferior_pid, (PTRACE_ARG3_TYPE) 0, 0);
   wait ((int *)0);
-}
-
-void
-kill_inferior ()
-{
-  kill_inferior_fast ();
   target_mourn_inferior ();
 }
 
index 0e21a14..8c8c33f 100644 (file)
@@ -68,21 +68,13 @@ call_ptrace (request, pid, addr, data)
 #define ptrace call_ptrace
 #endif
 
-/* This is used when GDB is exiting.  It gives less chance of error.*/
-
 void
-kill_inferior_fast ()
+kill_inferior ()
 {
   if (inferior_pid == 0)
     return;
   ptrace (PT_EXIT, inferior_pid, (PTRACE_ARG3_TYPE) 0, 0, 0); /* PT_EXIT = PT_KILL ? */
   wait ((int *)0);
-}
-
-void
-kill_inferior ()
-{
-  kill_inferior_fast ();
   target_mourn_inferior ();
 }
 
index 0365c65..b39402e 100644 (file)
@@ -1033,39 +1033,6 @@ ptrace (request, pid, arg3, arg4)
 
 GLOBAL FUNCTION
 
-       kill_inferior_fast -- kill inferior while gdb is exiting
-
-SYNOPSIS
-
-       void kill_inferior_fast (void)
-
-DESCRIPTION
-
-       This is used when GDB is exiting.  It gives less chance of error.
-
-NOTES
-
-       Don't attempt to kill attached inferiors since we may be called
-       when gdb is in the process of aborting, and killing the attached
-       inferior may be very anti-social.  This is particularly true if we
-       were attached just so we could use the /proc facilities to get
-       detailed information about it's status.
-
-*/
-
-void
-kill_inferior_fast ()
-{
-  if (inferior_pid != 0 && !attach_flag)
-    {
-      unconditionally_kill_inferior ();
-    }
-}
-
-/*
-
-GLOBAL FUNCTION
-
        kill_inferior - kill any currently inferior
 
 SYNOPSIS