8sa1-binutils-gdb/gdb/testsuite/gdb.trace
Andrew Burgess c708f4d256 gdb: Don't call gdb_load_shlib unless GDB is running
The gdb_load_shlib function will, on remote targets, try to run some
GDB commands.  This obviously isn't going to work unless GDB is
running.

The gdb.trace/tspeed.exp test calls gdb_load_shlib before starting
GDB.  Don't do that.

The failure that's triggered is actually DeJaGNU complaining that the
variable $use_gdb_stub doesn't exist, this is only created when GDB is
started.  Something like this should trigger a failure:

  make check-gdb \
    RUNTESTFLAGS="--target_board=remote-gdbserver-on-localhost \
                  gdb.trace/tspeed.exp"

This commit also adds a check to gdb_load_shlib that GDB is running.
The check is always performed, so this should catch cases where a GDB
developer adds a use of gdb_load_shlib but doesn't test their code
with a remote target.

gdb/testsuite/ChangeLog:

	* gdb.trace/tspeed.exp: Only call gdb_load_shlib after gdb has
	started.
	* lib/gdb.exp (gdb_load_shlib): Call perror if GDB is not running.
2018-07-28 20:21:50 +01:00
..
actions-changed.c
actions-changed.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
actions.c
actions.exp
ax.exp
backtrace.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
change-loc-1.c
change-loc-2.c
change-loc.c
change-loc.exp
change-loc.h
circ.c
circ.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
collection.c
collection.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
deltrace.exp
disconnected-tracing.c
disconnected-tracing.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
entry-values.c
entry-values.exp
ftrace-lock.c
ftrace-lock.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
ftrace.c
ftrace.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
infotrace.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
mi-trace-frame-collected.exp
mi-trace-save.exp
mi-trace-unavailable.exp
mi-traceframe-changed.exp
mi-tracepoint-changed.exp
mi-tsv-changed.exp
no-attach-trace.c
no-attach-trace.exp
packetlen.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
passc-dyn.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
passcount.exp
pending.c
pending.exp
pendshr1.c
pendshr2.c
pr16508.exp
qtro.c
qtro.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
range-stepping.c
range-stepping.exp
read-memory.c
read-memory.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
report.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
save-trace.exp
signal.c
signal.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
stap-trace.c
stap-trace.exp
status-stop.c
status-stop.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
strace.c
strace.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
tfile.c
tfile.exp
tfind.exp Update help text in tracepoint.c 2018-05-24 12:29:22 -06:00
trace-break.c
trace-break.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
trace-buffer-size.c
trace-buffer-size.exp
trace-common.h
trace-condition.c
trace-condition.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
trace-enable-disable.c
trace-enable-disable.exp
trace-mt.c
trace-mt.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
trace-unavailable.c
tracecmd.exp
tracefile-pseudo-reg.c
tracefile-pseudo-reg.exp
tspeed.c
tspeed.exp gdb: Don't call gdb_load_shlib unless GDB is running 2018-07-28 20:21:50 +01:00
tstatus.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
tsv.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
unavailable-dwarf-piece.c
unavailable-dwarf-piece.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
unavailable.cc
unavailable.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
while-dyn.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
while-stepping.exp