aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/attach2.c
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2019-12-21 14:19:40 +0100
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2020-01-25 11:08:24 +0100
commitb1468492c69335b023e6e4adf15ba0de0263812e (patch)
treea4ac8fefbad17a1e3cdd4fd07cbdae71692a003e /gdb/testsuite/gdb.base/attach2.c
parenta2fedca99c622e1b523046d09f573b06de0207a6 (diff)
downloadgdb-b1468492c69335b023e6e4adf15ba0de0263812e.zip
gdb-b1468492c69335b023e6e4adf15ba0de0263812e.tar.gz
gdb-b1468492c69335b023e6e4adf15ba0de0263812e.tar.bz2
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'.
Diffstat (limited to 'gdb/testsuite/gdb.base/attach2.c')
-rw-r--r--gdb/testsuite/gdb.base/attach2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/attach2.c b/gdb/testsuite/gdb.base/attach2.c
index a78037e..44d3725 100644
--- a/gdb/testsuite/gdb.base/attach2.c
+++ b/gdb/testsuite/gdb.base/attach2.c
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <unistd.h>
+float bidule = 0.0;
int should_exit = 0;
int main ()