aboutsummaryrefslogtreecommitdiff
path: root/gdb/observable.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2021-11-18 15:06:01 -0700
committerKevin Buettner <kevinb@redhat.com>2021-11-18 15:38:34 -0700
commit76183fd1bf613fd0d899092bf5594a641e1224ae (patch)
tree2deb652ef91ce6890ae23bdf017ec1b68f6588c6 /gdb/observable.c
parent140eb481d1c31d9327b7baf7901c354c8e224dab (diff)
downloadgdb-76183fd1bf613fd0d899092bf5594a641e1224ae.zip
gdb-76183fd1bf613fd0d899092bf5594a641e1224ae.tar.gz
gdb-76183fd1bf613fd0d899092bf5594a641e1224ae.tar.bz2
dprintf-execution-x-script.exp: Adjust test for native-extended-gdbserver
Without this commit, doing... make check RUNTESTFLAGS="--target_board=native-extended-gdbserver" \ TESTS="gdb.base/dprintf-execution-x-script.exp" ...will show one failure. Here's a snippet from gdb.log showing the circumstances - I've trimmed the paths for readability: builtin_spawn gdb -nw -nx -data-directory data-directory -iex set height 0 -iex set width 0 -iex set auto-connect-native-target off -iex set sysroot -ex set height unlimited -x testsuite/gdb.base/dprintf-execution-x-script.gdb --args testsuite/outputs/gdb.base/dprintf-execution-x-script/dprintf-execution-x-script ... Reading symbols from testsuite/outputs/gdb.base/dprintf-execution-x-script/dprintf-execution-x-script... Dprintf 1 at 0x40116e: file testsuite/gdb.base/dprintf-execution-x-script.c, line 38. Breakpoint 2 at 0x40113a: file testsuite/gdb.base/dprintf-execution-x-script.c, line 26. testsuite/gdb.base/dprintf-execution-x-script.gdb:21: Error in sourced command file: Don't know how to run. Try "help target". (gdb) FAIL: gdb.base/dprintf-execution-x-script.exp: load and run script with -x ... GNU gdb (GDB) 12.0.50.20211118-git Copyright (C) 2021 Free Software Foundation, Inc. ... (gdb) set height 0 (gdb) set width 0 (gdb) builtin_spawn gdbserver/gdbserver --once --multi localhost:2346 Listening on port 2346 target extended-remote localhost:2346 Remote debugging using localhost:2346 ... [Tests after this point will pass.] Note that the command which spawns gdb prevents the gdb script from using the native target via "-iex set auto-connect-native-target off". Moreover, the script in question contains a "run" command, so GDB doesn't know how to run (since it's prevented from using the native target and no alternate "target" command has been issued. But, once GDB finishes starting up, the test will spawn a gdbserver and then connect to it. The other (two) tests after this point both pass. I've fixed this by using gdb_test_multiple instead of gdb_test. When a "Don't know how to run message" is received, the test is unsupported. I've also added a comment explaining the reason for needing to check for "Don't know how to run" despite bailing out at the top of the test via: if ![target_can_use_run_cmd] { return 0 }
Diffstat (limited to 'gdb/observable.c')
0 files changed, 0 insertions, 0 deletions