Test 'set exec-file-mismatch ask|warn|off'.
Modify gdb.base/attach.exp to test the behaviour of the option
exec-file-mismatch. Note that this test can also be run using/
make check RUNTESTFLAGS="--target_board=native-extended-gdbserver" TESTS=gdb.base/attach.exp
to test the behaviour of attaching to running program using a gdb server.
Note: when running the test with a gdbserver, the tests in
test_command_line_attach_run fail because the command "run" is not supported.
I tried to extend the condition
if ![isnative] then {
unsupported "commandline attach run test"
return 0
}
but unclear to me how to best do that. The below trials all failed
to work properly:
if { ![isnative] || [target_is_gdbserver] } then {
if { ![isnative] || [use_gdb_stub] } then {
if { ![isnative] || [is_remote target] } then {
=> could never obtain a condition that was true with gdbserver.
2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.base/attach.exp: Test 'set exec-file-mismatch'.