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 Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
actions-changed.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
actions.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
actions.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ax.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
backtrace.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
change-loc-1.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
change-loc-2.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
change-loc.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
change-loc.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
change-loc.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
circ.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
circ.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
collection.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
collection.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
deltrace.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
disconnected-tracing.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
disconnected-tracing.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
entry-values.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
entry-values.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ftrace-lock.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ftrace-lock.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
ftrace.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
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 Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mi-trace-save.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mi-trace-unavailable.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mi-traceframe-changed.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mi-tracepoint-changed.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mi-tsv-changed.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
no-attach-trace.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
no-attach-trace.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
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 Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
pending.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
pending.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
pendshr1.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
pendshr2.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
pr16508.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
qtro.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
qtro.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
range-stepping.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
range-stepping.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
read-memory.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
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 Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
signal.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
signal.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
stap-trace.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
stap-trace.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
status-stop.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
status-stop.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
strace.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
strace.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
tfile.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tfile.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tfind.exp Update help text in tracepoint.c 2018-05-24 12:29:22 -06:00
trace-break.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-break.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
trace-buffer-size.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-buffer-size.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-common.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-condition.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-condition.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
trace-enable-disable.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-enable-disable.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-mt.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-mt.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
trace-unavailable.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tracecmd.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tracefile-pseudo-reg.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tracefile-pseudo-reg.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tspeed.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
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 Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
unavailable-dwarf-piece.exp Testsuite: Fix ambiguous "break" due to libinproctrace 2018-03-19 13:13:09 +01:00
unavailable.cc Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
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 Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00