Fix gdb.trace testcase build failures with Clang
25 gdb.trace tests failed to build on x86 with Clang because the
x86_trace_dummy function is optimized out, causing the builds to
fail with variations on the following error:
gdb compile failed, /usr/bin/ld:
/gdbtest/build/gdb/testsuite/outputs/gdb.trace/backtrace/backtrace0.o:
in function `main':
/gdbtest/src/gdb/testsuite/gdb.trace/actions.c:146: undefined
reference to `x86_trace_dummy'
clang-12: error: linker command failed with exit code 1
This commit adds __attribute__ ((used)) to x86_trace_dummy to prevent
this.
gdb/testsuite/ChangeLog:
* gdb.trace/trace-common.h (x86_trace_dummy): Add
__attribute__ ((used)).