old-cross-binutils/gdb/testsuite/gdb.trace
Pedro Alves 60fb7e9efa 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.
2015-02-20 19:50:36 +00:00
..
actions-changed.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
actions-changed.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
actions.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
actions.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ax.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
backtrace.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
change-loc-1.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
change-loc-2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
change-loc.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
change-loc.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
change-loc.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
circ.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
circ.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
collection.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
collection.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
deltrace.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
disconnected-tracing.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
disconnected-tracing.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
entry-values.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
entry-values.exp Require numeric attributes to specify the form. 2015-01-11 15:45:43 -08:00
ftrace.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
ftrace.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
infotrace.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
Makefile.in gdbserver: Fix crash when QTinit is handled with no inferior process attached 2015-02-10 13:49:41 -05:00
mi-trace-frame-collected.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-trace-unavailable.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-traceframe-changed.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-tracepoint-changed.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
mi-tsv-changed.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
no-attach-trace.c gdbserver: Fix crash when QTinit is handled with no inferior process attached 2015-02-10 13:49:41 -05:00
no-attach-trace.exp Fix no-attach-trace.exp with "target remote" / gdbserver 2015-02-20 19:50:36 +00:00
packetlen.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
passc-dyn.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
passcount.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pending.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pending.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pendshr1.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pendshr2.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
pr16508.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
qtro.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
qtro.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
range-stepping.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
range-stepping.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
read-memory.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
read-memory.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
report.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
save-trace.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
stap-trace.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
stap-trace.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
status-stop.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
status-stop.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
strace.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
strace.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tfile.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tfile.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tfind.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-break.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-break.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-buffer-size.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-buffer-size.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-mt.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-mt.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
trace-unavailable.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tracecmd.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tspeed.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tspeed.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tstatus.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
tsv.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
unavailable-dwarf-piece.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
unavailable-dwarf-piece.exp Require numeric attributes to specify the form. 2015-01-11 15:45:43 -08:00
unavailable.cc Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
unavailable.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
while-dyn.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
while-stepping.exp Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00