]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
Fix no-attach-trace.exp with "target remote" / gdbserver
authorPedro Alves <palves@redhat.com>
Fri, 20 Feb 2015 19:50:36 +0000 (19:50 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 20 Feb 2015 19:50:36 +0000 (19:50 +0000)
commit60fb7e9efa12266437d28d19191e49e7f1e0013d
tree07b0712392de880b248e8903288345f30485a07e
parent5c5019c27c5a4a73ec53281b4b69044f82b179f0
Fix no-attach-trace.exp with "target remote" / gdbserver

 $ make check RUNTESTFLAGS="--target_board=native-gdbserver no-attach-trace.exp"
 ...
 (gdb) trace main
 Tracepoint 1 at 0x400594: file /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.trace/no-attach-trace.c, line 25.
 (gdb) PASS: gdb.trace/no-attach-trace.exp: set tracepoint on main
 tstart
 You can't do that when your target is `exec'
 (gdb) FAIL: gdb.trace/no-attach-trace.exp: tstart

Even though this target supports tracing, the test restarts GDB and
doesn't do gdb_run_cmd so does not reconnect to the remote target.  So
at that point, GDB only has the "exec" target, which obviously doesn't
do tracing.

The test is about doing "tstart" before running a program, so the fix
is to do gdb_target_supports_trace with whatever target GDB ends up
connected after clean_restart.

Tested on x86_64 Fedora 20, native, native-gdbserver and
native-extended-gdbserver boards.  The test passes with the latter,
and is skipped with the first two.

gdb/testsuite/ChangeLog:
2015-02-20  Pedro Alves  <palves@redhat.com>

* gdb.trace/no-attach-trace.exp: Don't run to main.  Do
clean_restart before gdb_target_supports_trace.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/no-attach-trace.exp