From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9022 invoked by alias); 24 Mar 2016 01:15:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 9013 invoked by uid 89); 24 Mar 2016 01:15:52 -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,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=ko, taste, Marcin, marcin X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Mar 2016 01:15:51 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id 416D73FF0E; Thu, 24 Mar 2016 02:16:50 +0100 (CET) Received: from [192.168.1.120] (unknown [62.28.189.238]) by hogfather.0x04.net (Postfix) with ESMTPSA id AC0585800FD; Thu, 24 Mar 2016 02:15:46 +0100 (CET) Subject: Re: [PATCH v4] gdbserver/s390: Switch on tracepoint support. To: Andreas Arnez References: <1457087959-3032-1-git-send-email-koriakin@0x04.net> <1458067311-12459-1-git-send-email-koriakin@0x04.net> Cc: gdb-patches@sourceware.org, Keith Seitz , Ulrich Weigand From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <56F33FC0.1020006@0x04.net> Date: Thu, 24 Mar 2016 01:15:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00488.txt.bz2 On 23/03/16 16:25, Andreas Arnez wrote: > On Tue, Mar 15 2016, Marcin Kościelnicki wrote: > >> Also adds s390 support to gdb.trace testsuite. >> >> gdb/gdbserver/ChangeLog: >> >> * linux-s390-low.c (s390_supports_tracepoints): New function. >> (struct linux_target_ops): Fill supports_tracepoints hook. >> >> gdb/testsuite/ChangeLog: >> >> * gdb.trace/ftrace.exp: Set arg0exp for s390. >> * gdb.trace/mi-trace-frame-collected.exp: Expect 4 registers on s390. >> * gdb.trace/mi-trace-unavailable.exp: Set pcnum for s390, add gpr0num >> variable for GPR 0 instead of assuming it is register 0. >> * gdb.trace/trace-common.h: Add s390 fast tracepoint placeholder. >> * lib/trace-support.exp: Add s390 registers. >> --- >> This fixes a minor conflict with the powerpc regular tracepoint support >> pushed in the meantime (mi-trace-unavailable.exp now needs gpr0num in >> powerpc branch). > > Please also document this new feature in the NEWS file. OK, I'll submit another patch adding the NEWS entry (it should go after the fast tracepoints). > > [...] > >> diff --git a/gdb/testsuite/lib/trace-support.exp b/gdb/testsuite/lib/trace-support.exp >> index 372a595..b307f3f 100644 >> --- a/gdb/testsuite/lib/trace-support.exp >> +++ b/gdb/testsuite/lib/trace-support.exp >> @@ -40,6 +40,10 @@ if [is_amd64_regs_target] { >> set fpreg "r31" >> set spreg "r1" >> set pcreg "pc" >> +} elseif { [istarget "s390*-*-*"] } { >> + set fpreg "r11" >> + set spreg "r15" >> + set pcreg "pc" >> } else { >> set fpreg "fp" >> set spreg "sp" > > Without having looked into the details I wonder why we can't use the > default, fp, sp, and pc. Also, I'd slightly prefer initializing these > variables with their default values first and then adjusting them per > target as required. (This is just a matter of taste.) These are user registers, which are not supported by the target-independent tracepoint code: 'sp' is a user-register; GDB cannot yet trace user-register contents. > > Otherwise the patch looks good to me. But I think a global- or > testsuite-maintainer should approve the changes to the testsuite. > > Thanks, > Andreas >