testsuite: adapt to new --debug command line option

Since commit "gdbserver: allow the --debug command line option to take a
value", gdbserver no longer supports
  --debug
  --remote-debug
  --event-loop-debug.

Instead, --debug now takes a comma separated list of components.

The make check parameter GDBSERVER_DEBUG doesn't support these changes
yet.  This patch fixes this, by adding the --debug gdbserver arguments,
as "debug-threads", "debug-remote", "debug-event-loop" or "debug-all" for
GDBSERVER_DEBUG.  Replay logging is still enabled by adding the
"replay" GDBSERVER_DEBUG argument.  We can also configure "all" to
enable all of the available options.

Now, for instance, we can use it as follows:

make check GDBSERVER_DEBUG="debug-remote,debug-event-loop,replay" RUNTESTFLAGS="--target_board=native-gdbserver" TESTS="gdb.trace/ftrace.exp"

or simply

make check GDBSERVER_DEBUG="all" RUNTESTFLAGS="--target_board=native-gdbserver" TESTS="gdb.trace/ftrace.exp"

to enable all debug options.

Approved-By: Tom Tromey <tom@tromey.com>
2 files changed