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.
This commit is contained in:
John Gilmore 1992-09-22 05:23:57 +00:00
parent 6b50c5c242
commit b28d361723
6 changed files with 22 additions and 66 deletions

View 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'.

View 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 *

View 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()");}

View 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 ();
}

View 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 ();
}

View file

@ -1031,39 +1031,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