Test 'set exec-file-mismatch ask|warn|off'.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 21 Dec 2019 13:19:40 +0000 (14:19 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 25 Jan 2020 10:08:24 +0000 (11:08 +0100)
commitb1468492c69335b023e6e4adf15ba0de0263812e
treea4ac8fefbad17a1e3cdd4fd07cbdae71692a003e
parenta2fedca99c622e1b523046d09f573b06de0207a6
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'.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/attach.c
gdb/testsuite/gdb.base/attach.exp
gdb/testsuite/gdb.base/attach2.c
This page took 0.024431 seconds and 4 git commands to generate.