diff options
Diffstat (limited to 'gdb/exec.c')
-rw-r--r-- | gdb/exec.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -85,7 +85,7 @@ show_write_files (struct ui_file *file, int from_tty, struct vmap *vmap; -void +static void exec_open (char *args, int from_tty) { target_preopen (from_tty); @@ -286,8 +286,11 @@ exec_file_command (char *args, int from_tty) { char **argv; char *filename; - - target_preopen (from_tty); + + if (from_tty && target_has_execution + && !query (_("A program is being debugged already.\n" + "Are you sure you want to change the file? "))) + error (_("File not changed.")); if (args) { |