gdbserver: Fix crash when QTinit is handled with no inferior process attached
When gdbserver is called with --multi and attach has not been called yet
and tstart is called on the gdb client, gdbserver would crash.
This patch fixes gdbserver so that it returns E01 to the gdb client.
Also this patch adds a testcase to verify this bug named no-attach-trace.exp
gdb/gdbserver/ChangeLog:
PR breakpoints/15956
* tracepoint.c (cmd_qtinit): Add check for current_thread.
gdb/testsuite/ChangeLog:
* gdb.trace/no-attach-trace.c: New file.
* gdb.trace/no-attach-trace.exp: New file.