diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 14b3da59116..3aa06fa72c9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-11-18 Joseph Myers + + * lib/mi-support.exp (mi_gdb_file_cmd): Check for case where + $arg.exe exists but $arg does not. + 2020-11-17 Gary Benson * gdb.trace/trace-common.h (x86_trace_dummy): Add diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 8e7b0ab79e2..bfc8edcd8d3 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -505,6 +505,11 @@ proc mi_gdb_file_cmd { arg } { global last_loaded_file upvar timeout timeout + # GCC for Windows target may create foo.exe given "-o foo". + if { ![file exists $arg] && [file exists "$arg.exe"] } { + set arg "$arg.exe" + } + set last_loaded_file $arg if [is_remote host] {