This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] gdb/testsuite/gdb.trace: Deduplicate set_point assembly.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 11 Nov 2015 08:42:31 +0000
- Subject: Re: [PATCH 2/2] gdb/testsuite/gdb.trace: Deduplicate set_point assembly.
- Authentication-results: sourceware.org; auth=none
- References: <1447154499-22247-1-git-send-email-koriakin at 0x04 dot net> <1447154499-22247-2-git-send-email-koriakin at 0x04 dot net>
Marcin KoÅcielnicki <koriakin@0x04.net> writes:
> +/* TRACEPOINT_ASM expands to an assembly instruction large enough to fit
> + a fast tracepoint jump. The parameter is the label where we'll set
> + tracepoints and breakpoints. */
> +
> +#if (defined __x86_64__ || defined __i386__)
> +
> +static void
> +x86_trace_dummy ()
> +{
> + int x = 0;
> + int y = x + 4;
> +}
> +
> +#define TRACEPOINT_ASM(name) \
> + asm (" .global " SYMBOL(name) "\n" \
> + SYMBOL(name) ":\n" \
> + " call " SYMBOL(x86_trace_dummy) "\n" \
> + )
> +
> +#elif (defined __aarch64__)
> +
> +#define TRACEPOINT_ASM(name) \
> + asm (" .global " SYMBOL(name) "\n" \
> + SYMBOL(name) ":\n" \
> + " nop\n" \
> + )
> +
> +#else
TRACEPOINT_ASM isn't a good name to me. How about
FAST_TRACEPOINT_LABEL?
Otherwise the patch looks good to me.
--
Yao (éå)