From patchwork Fri May 27 19:05:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tremblay X-Patchwork-Id: 12582 Received: (qmail 130653 invoked by alias); 27 May 2016 19:05:44 -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 130571 invoked by uid 89); 27 May 2016 19:05:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 27 May 2016 19:05:32 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id A0.AF.09012.5C198475; Fri, 27 May 2016 20:28:21 +0200 (CEST) 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.294.0; Fri, 27 May 2016 15:05:25 -0400 From: Antoine Tremblay To: CC: Antoine Tremblay Subject: [PATCH 4/5 v2] Add variable length tests for emit_ref in trace-condition.exp Date: Fri, 27 May 2016 15:05:15 -0400 Message-ID: <1464375916-16369-4-git-send-email-antoine.tremblay@ericsson.com> In-Reply-To: <1464375916-16369-1-git-send-email-antoine.tremblay@ericsson.com> References: <1464375916-16369-1-git-send-email-antoine.tremblay@ericsson.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch add variable length tests for emit_ref by reading the variable passed as argument of 8 to 64 bit. gdb/testsuite/ChangeLog: * gdb.trace/trace-condition.c (marker): Adapt signature to 8 to 64 bits types. (main): Adapt to 8 to 64 bits types. * gdb.trace/trace-condition.exp: Add new tests. --- gdb/testsuite/gdb.trace/trace-condition.c | 8 +++++--- gdb/testsuite/gdb.trace/trace-condition.exp | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.trace/trace-condition.c b/gdb/testsuite/gdb.trace/trace-condition.c index 94bb30c..f0b1863 100644 --- a/gdb/testsuite/gdb.trace/trace-condition.c +++ b/gdb/testsuite/gdb.trace/trace-condition.c @@ -16,8 +16,9 @@ along with this program. If not, see . */ #include "trace-common.h" +#include -int globvar; +int64_t globvar; static void begin (void) @@ -25,7 +26,7 @@ begin (void) } static void -marker (int anarg) +marker (int8_t arg8, int16_t arg16, int32_t arg32, int64_t arg64) { FAST_TRACEPOINT_LABEL(set_point); } @@ -41,7 +42,8 @@ main () begin (); for (globvar = 1; globvar < 11; ++globvar) - marker (globvar * 100); + marker (globvar, globvar + (1 << 8), globvar + (1 << 16), + globvar + (1LL << 32)); end (); return 0; diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp index e179828..b7551b1 100644 --- a/gdb/testsuite/gdb.trace/trace-condition.exp +++ b/gdb/testsuite/gdb.trace/trace-condition.exp @@ -132,9 +132,12 @@ foreach trace_command { "trace" "ftrace" } { test_tracepoints $trace_command "\$$pcreg == *set_point" 10 # Can we read local variables? - test_tracepoints $trace_command "anarg == 100 || anarg == 200" 2 18955_x86_64_failure + test_tracepoints $trace_command "arg8 == 1 || arg8 == 2" 2 18955_x86_64_failure + test_tracepoints $trace_command "arg16 == 257 || arg16 == 258" 2 18955_x86_64_failure + test_tracepoints $trace_command "arg32 == 65537 || arg32 == 65538" 2 18955_x86_64_failure + test_tracepoints $trace_command "arg64 == 4294967297 || arg64 == 4294967298" 2 18955_x86_64_failure # Can we read global variables? - test_tracepoints $trace_command "anarg == 100 && globvar == 1" 1 18955_x86_64_failure + test_tracepoints $trace_command "arg16 == 257 && globvar == 1" 1 18955_x86_64_failure # Test various operations to cover as many opcodes as possible. test_tracepoints $trace_command "21 == 21" 10