This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH V2 4/5] Use FAST_TRACEPOINT_LABEL in range-stepping.exp
- From: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- Date: Thu, 3 Nov 2016 10:32:59 -0400
- Subject: [PATCH V2 4/5] Use FAST_TRACEPOINT_LABEL in range-stepping.exp
- Authentication-results: sourceware.org; auth=none
- References: <20161103143300.24934-1-antoine.tremblay@ericsson.com>
This patch uses FAST_TRACEPOINT_LABEL for the fast tracepoint label rather
than the local version of that same code.
gdb/testsuite/ChangeLog:
* gdb.trace/range-stepping.c: Use FAST_TRACEPOINT_LABEL
---
gdb/testsuite/gdb.trace/range-stepping.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/gdb/testsuite/gdb.trace/range-stepping.c b/gdb/testsuite/gdb.trace/range-stepping.c
index 46ddcf7..401cee7 100644
--- a/gdb/testsuite/gdb.trace/range-stepping.c
+++ b/gdb/testsuite/gdb.trace/range-stepping.c
@@ -15,22 +15,7 @@
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
-
-/* `set_point' further below is the label where we'll set tracepoints
- at. The insn at the label must the large enough to fit a fast
- tracepoint jump. */
-#if (defined __x86_64__ || defined __i386__)
-# define NOP " .byte 0xe9,0x00,0x00,0x00,0x00\n" /* jmp $+5 (5-byte nop) */
-#elif (defined __aarch64__)
-# define NOP " nop\n"
-#else
-# define NOP "" /* port me */
-#endif
+#include "trace-common.h"
int
main(void)
@@ -45,10 +30,7 @@ main(void)
#define LINE_WITH_FAST_TRACEPOINT \
do { \
i = 1; \
- asm (" .global " SYMBOL (set_point) "\n" \
- SYMBOL (set_point) ":\n" \
- NOP \
- ); \
+ FAST_TRACEPOINT_LABEL(set_point); \
i = 2; \
} while (0)
--
2.9.2