Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Antoine Tremblay <antoine.tremblay@ericsson.com>
Subject: [PATCH V2 4/5] Use FAST_TRACEPOINT_LABEL in range-stepping.exp
Date: Thu, 03 Nov 2016 14:33:00 -0000	[thread overview]
Message-ID: <20161103143300.24934-5-antoine.tremblay@ericsson.com> (raw)
In-Reply-To: <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


  parent reply	other threads:[~2016-11-03 14:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 14:33 [PATCH V2 0/5] Support tracepoints for ARM linux in GDBServer Antoine Tremblay
2016-11-03 14:33 ` [PATCH V2 2/5] Enable tracing of pseudo-registers on ARM Antoine Tremblay
2016-11-03 14:33 ` Antoine Tremblay [this message]
2016-11-03 14:33 ` [PATCH V2 3/5] Improve tests to allow for targets that support trace but not ftrace Antoine Tremblay
2016-11-03 14:33 ` [PATCH V2 1/5] Teach arm unwinders to terminate gracefully Antoine Tremblay
2016-11-03 14:33 ` [PATCH V2 5/5] Support tracepoints for ARM linux in GDBServer Antoine Tremblay
2016-11-03 17:51   ` Eli Zaretskii
2016-11-03 18:12     ` Antoine Tremblay
2016-11-10 14:01   ` Yao Qi
2016-11-15 14:42     ` Antoine Tremblay
2016-11-16 20:49       ` Yao Qi
2016-11-07  9:25 ` [PATCH V2 0/5] " Yao Qi
     [not found]   ` <wwoka8dasqta.fsf@ericsson.com>
2016-11-08 15:34     ` Antoine Tremblay
2016-11-09 16:39     ` Yao Qi
2016-11-09 17:58       ` Antoine Tremblay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161103143300.24934-5-antoine.tremblay@ericsson.com \
    --to=antoine.tremblay@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox