diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-07-11 16:58:47 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-07-28 20:21:50 +0100 |
commit | c708f4d256f1f1a92310fcb323a108d95d5fd5da (patch) | |
tree | c0d2dbead0308d12bb35b78f4b10e072901226c3 /gdb/valarith.c | |
parent | 37cc0caeca4c9a8552370040f4cfeaeceaa03369 (diff) | |
download | gdb-c708f4d256f1f1a92310fcb323a108d95d5fd5da.zip gdb-c708f4d256f1f1a92310fcb323a108d95d5fd5da.tar.gz gdb-c708f4d256f1f1a92310fcb323a108d95d5fd5da.tar.bz2 |
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.
Diffstat (limited to 'gdb/valarith.c')
0 files changed, 0 insertions, 0 deletions