summaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index a3807deaa63..297b2a0b9bc 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -244,8 +244,8 @@ run_command (args, from_tty)
if (inferior_pid != 0 && target_has_execution)
{
- if (
- !query ("The program being debugged has been started already.\n\
+ if (from_tty
+ && !query ("The program being debugged has been started already.\n\
Start it from the beginning? "))
error ("Program not restarted.");
target_kill ();