* infcmd.c (kill_if_already_running): Make static. Use

target_require_runnable.
	* target.c (target_require_runnable): New.
	* target.h (target_require_runnable): Declare.

	* gdb.texinfo (Starting): Mention always-running targets.
	(Target Commands): Add an anchor for load.
	(Connecting): Explain continue instead of run.
This commit is contained in:
Daniel Jacobowitz
2008-02-28 16:26:18 +00:00
parent 0d6ba1b16e
commit 8edfe26932
6 changed files with 72 additions and 5 deletions

View File

@@ -444,11 +444,15 @@ post_create_inferior (struct target_ops *target, int from_tty)
from the beginning. Ask the user to confirm that he wants to restart
the program being debugged when FROM_TTY is non-null. */
void
static void
kill_if_already_running (int from_tty)
{
if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
{
/* Bail out before killing the program if we will not be able to
restart it. */
target_require_runnable ();
if (from_tty
&& !query ("The program being debugged has been started already.\n\
Start it from the beginning? "))