aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 3e7c43f..b44adca 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2785,6 +2785,9 @@ attach_command (const char *args, int from_tty)
target_stop (ptid_t (inferior_ptid.pid ()));
}
+ /* Check for exec file mismatch, and let the user solve it. */
+ validate_exec_file (from_tty);
+
mode = async_exec ? ATTACH_POST_WAIT_RESUME : ATTACH_POST_WAIT_STOP;
/* Some system don't generate traps when attaching to inferior.