diff options
-rw-r--r-- | gdb/ChangeLog | 17 | ||||
-rw-r--r-- | gdb/convex-xdep.c | 14 | ||||
-rw-r--r-- | gdb/go32-xdep.c | 4 | ||||
-rw-r--r-- | gdb/hppabsd-xdep.c | 10 | ||||
-rw-r--r-- | gdb/hppahpux-xdep.c | 10 | ||||
-rw-r--r-- | gdb/procfs.c | 33 |
6 files changed, 22 insertions, 66 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cd1108f..27276ef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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'. diff --git a/gdb/convex-xdep.c b/gdb/convex-xdep.c index ba4da80..8282b30 100644 --- a/gdb/convex-xdep.c +++ b/gdb/convex-xdep.c @@ -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 * diff --git a/gdb/go32-xdep.c b/gdb/go32-xdep.c index a929940..b546121 100644 --- a/gdb/go32-xdep.c +++ b/gdb/go32-xdep.c @@ -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()");} diff --git a/gdb/hppabsd-xdep.c b/gdb/hppabsd-xdep.c index 7e9d4f4..bec14c4 100644 --- a/gdb/hppabsd-xdep.c +++ b/gdb/hppabsd-xdep.c @@ -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 (); } diff --git a/gdb/hppahpux-xdep.c b/gdb/hppahpux-xdep.c index 0e21a14..8c8c33f 100644 --- a/gdb/hppahpux-xdep.c +++ b/gdb/hppahpux-xdep.c @@ -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 (); } diff --git a/gdb/procfs.c b/gdb/procfs.c index 0365c65..b39402e 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -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 |