aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/pendshr2.c
diff options
context:
space:
mode:
authorMarcin Koƛcielnicki <koriakin@0x04.net>2015-11-10 12:12:00 +0100
committerMarcin Koƛcielnicki <koriakin@0x04.net>2015-11-11 21:44:04 +0100
commit430e004ef7ecb3f75fc3c6642c9fdfb1d85a3694 (patch)
treeb2e394177479e5ed63088ef277a011122d9e89a3 /gdb/testsuite/gdb.trace/pendshr2.c
parent4397c913d5640ba61316d3e631d544cf768b5a36 (diff)
downloadgdb-430e004ef7ecb3f75fc3c6642c9fdfb1d85a3694.zip
gdb-430e004ef7ecb3f75fc3c6642c9fdfb1d85a3694.tar.gz
gdb-430e004ef7ecb3f75fc3c6642c9fdfb1d85a3694.tar.bz2
gdb/testsuite/gdb.trace: Deduplicate set_point assembly.
The assembly code for emitting the proper tracepointable instruction was duplicated in many places. Keep it in one place, to reduce work needed for new targets. gdb/testsuite/ChangeLog: * gdb.trace/change-loc.h: include "trace-common.h", remove SYMBOL macro. (func5): Removed. (func4): Use FAST_TRACEPOINT_LABEL. * gdb.trace/ftrace-lock.c: include "trace-common.h", remove SYMBOL macro. (func): Removed. (thread_function): Use FAST_TRACEPOINT_LABEL. * gdb.trace/ftrace.c: include "trace-common.h", remove SYMBOL macro. (func): Remove. (marker): Use FAST_TRACEPOINT_LABEL. * gdb.trace/pendshr1.c: include "trace-common.h", remove SYMBOL macro. (pendfunc1): Remove. (pendfunc): Use FAST_TRACEPOINT_LABEL. * gdb.trace/pendshr2.c: include "trace-common.h", remove SYMBOL macro. (foo): Remove. (pendfunc2): Use FAST_TRACEPOINT_LABEL. * gdb.trace/trace-break.c: include "trace-common.h", remove SYMBOL macro. (func): Remove. (marker): Use FAST_TRACEPOINT_LABEL. * gdb.trace/trace-common.h: New header. * gdb.trace/trace-condition.c: include "trace-common.h", remove SYMBOL macro. (func): Remove. (marker): Use FAST_TRACEPOINT_LABEL. * gdb.trace/trace-mt.c: include "trace-common.h", remove SYMBOL macro. (func): Remove. (thread_function): Use FAST_TRACEPOINT_LABEL.
Diffstat (limited to 'gdb/testsuite/gdb.trace/pendshr2.c')
-rw-r--r--gdb/testsuite/gdb.trace/pendshr2.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/gdb/testsuite/gdb.trace/pendshr2.c b/gdb/testsuite/gdb.trace/pendshr2.c
index f7ec733..23fda6f 100644
--- a/gdb/testsuite/gdb.trace/pendshr2.c
+++ b/gdb/testsuite/gdb.trace/pendshr2.c
@@ -15,28 +15,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef SYMBOL_PREFIX
-#define SYMBOL(str) SYMBOL_PREFIX #str
-#else
-#define SYMBOL(str) #str
-#endif
-
-static void
-foo ()
-{}
+#include "trace-common.h"
void
pendfunc2 (int x)
{
- /* `set_point2' is the label where we'll set multiple tracepoints and
- breakpoints at. The insn at the label must the large enough to
- fit a fast tracepoint jump. */
- asm (" .global " SYMBOL(set_point2) "\n"
- SYMBOL(set_point2) ":\n"
-#if (defined __x86_64__ || defined __i386__)
- " call " SYMBOL(foo) "\n"
-#elif (defined __aarch64__)
- " nop\n"
-#endif
- );
+ FAST_TRACEPOINT_LABEL(set_point2);
}