diff options
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/target.c b/gdb/target.c index 9ba43fd..3c18b40 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -962,7 +962,8 @@ target_preopen (from_tty) if (target_has_execution) { - if (query ("A program is being debugged already. Kill it? ")) + if (!from_tty + || query ("A program is being debugged already. Kill it? ")) target_kill (); else error ("Program not killed."); |