From patchwork Thu Nov 3 14:32:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tremblay X-Patchwork-Id: 17164 Received: (qmail 54869 invoked by alias); 3 Nov 2016 14:33:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 54775 invoked by uid 89); 3 Nov 2016 14:33:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=BAYES_00, KAM_STOCKGEN, SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1534, SYMBOL, 1522 X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Nov 2016 14:33:28 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by (Symantec Mail Security) with SMTP id 8C.A1.02571.146FA185; Thu, 3 Nov 2016 09:33:06 +0100 (CET) Received: from elxa4wqvvz1.dyn.mo.ca.am.ericsson.se (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.78) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 3 Nov 2016 10:33:09 -0400 From: Antoine Tremblay To: CC: Antoine Tremblay Subject: [PATCH V2 4/5] Use FAST_TRACEPOINT_LABEL in range-stepping.exp Date: Thu, 3 Nov 2016 10:32:59 -0400 Message-ID: <20161103143300.24934-5-antoine.tremblay@ericsson.com> In-Reply-To: <20161103143300.24934-1-antoine.tremblay@ericsson.com> References: <20161103143300.24934-1-antoine.tremblay@ericsson.com> MIME-Version: 1.0 X-IsSubscribed: yes 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 . */ -#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)