diff options
author | Joseph Myers <joseph@codesourcery.com> | 2020-11-18 19:44:20 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2020-11-18 19:44:20 +0000 |
commit | 6b6a3e057eaab9735b683e32fe55f3ebf4ebae7e (patch) | |
tree | 48db249f7aac8abfe3d92ac570d9dd4567ab1533 /gdb | |
parent | 5d8254e18560653d6d4d4d62be2a35ef68de4376 (diff) | |
download | binutils-6b6a3e057eaab9735b683e32fe55f3ebf4ebae7e.zip binutils-6b6a3e057eaab9735b683e32fe55f3ebf4ebae7e.tar.gz binutils-6b6a3e057eaab9735b683e32fe55f3ebf4ebae7e.tar.bz2 |
Fix Windows-target testing in mi_gdb_file_cmd
Similar to my recent fix for gdb_file_cmd, mi_gdb_file_cmd also runs
into problems when GCC has created foo.exe given "-o foo".
Apply exactly the same fix there as in gdb_file_cmd. This allows many
more tests to succeed for Windows target that previously fell over.
2020-11-18 Joseph Myers <joseph@codesourcery.com>
* lib/mi-support.exp (mi_gdb_file_cmd): Check for case where
$arg.exe exists but $arg does not.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 14b3da5..3aa06fa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-11-18 Joseph Myers <joseph@codesourcery.com> + + * lib/mi-support.exp (mi_gdb_file_cmd): Check for case where + $arg.exe exists but $arg does not. + 2020-11-17 Gary Benson <gbenson@redhat.com> * 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 8e7b0ab..bfc8edc 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] { |