Introduce procedure use_gdb_stub
authorSimon Marchi <simon.marchi@ericsson.com>
Wed, 4 May 2016 13:27:19 +0000 (09:27 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Wed, 4 May 2016 13:28:45 +0000 (09:28 -0400)
commit8929ad8bbca9a8b036eba0397992d6f3b4d1966b
tree9e43860420cc8d8daa0eda06dcf4377d41a6f757
parent4a85cc09258dfe2ab3cefb503221696a0f439c63
Introduce procedure use_gdb_stub

This patch introduces the use_gdb_stub procedure, which allows getting
the right value of the use_gdb_stub variable/property in any all
situations.

When calling it before the $use_gdb_stub global variable has been set,
it will return the value of the use_gdb_stub property from the board
file.  This happens when tests want to bail out early (even before gdb
has been started) when the current test setup is a stub.

Otherwise, it returns the value of the $use_gdb_stub global.

It's possible for these two to differ when a test file overrides the
value of the global.

gdb/testsuite/ChangeLog:

* lib/gdb.exp (use_gdb_stub): New procedure.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp