From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123105 invoked by alias); 6 Feb 2016 20:58:32 -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 123096 invoked by uid 89); 6 Feb 2016 20:58:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=vfp, Hx-languages-length:1964, spu, cell 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; Sat, 06 Feb 2016 20:58:30 +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 4BEDB3FE5C; Sat, 6 Feb 2016 21:59:17 +0100 (CET) Received: from [192.168.0.17] (87-206-68-155.dynamic.chello.pl [87.206.68.155]) by hogfather.0x04.net (Postfix) with ESMTPSA id 89D2E58008C; Sat, 6 Feb 2016 21:58:28 +0100 (CET) Subject: Re: [PATCH 2/4] Use the target architecture when encoding tracepoint actions To: Antoine Tremblay , gdb-patches@sourceware.org References: <1452188697-23870-1-git-send-email-antoine.tremblay@ericsson.com> <1452188697-23870-3-git-send-email-antoine.tremblay@ericsson.com> From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <56B65E73.7020305@0x04.net> Date: Sat, 06 Feb 2016 20:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1452188697-23870-3-git-send-email-antoine.tremblay@ericsson.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00168.txt.bz2 On 07/01/16 18:44, Antoine Tremblay wrote: > This patch uses the target architecture rather then the objfile > architecture when encoding tracepoint actions. > > The target architecture may contain additional registers. E.g. ARM VFP > registers. This information is needed to allow their collection. Since we > can never know whether the registers numbers in the target match the > binary's we have to use tdesc here. > > One note about combined debuggers / multi-inferior from Pedro Alves: > > In the combined debugger case taking Cell as the practical example that > gdb supports currently: > > In that case, the main target_gdbarch() will be powerpc, but you may have set a > tracepoint on _spu_ code, which has a different gdbarch. so for that case, > target_gdbarch would be wrong. I think that in that case, we'd need to > find __the_ target/tdesc gdbarch that is (bfd) compatible with the > objfile's gdbarch. > > I think cell/spu gdbserver doesn't support tracepoints, so we can ignore > this for now. > > The multi-inferior/process case is somewhat related, but its simpler. > each inferior has its own gdbarch. > > That is, target_gdbarch depends on the current inferior selected. > In fact, that just returns inferior->gdbarch nowaways. > > No regressions, tested on ubuntu 14.04 ARMv7 and x86. > With gdbserver-{native,extended} / { -marm -mthumb } > > gdb/ChangeLog: > > * tracepoint.c (encode_actions_1): Use target_gdbarch () rather > than loc->gdbarch. > [...] Hey, could we get that one pushed soon? I've made a patchset that adds tdesc information to tfile format, making it work properly for multiple-tdesc architectures (https://sourceware.org/ml/gdb-patches/2016-02/msg00161.html), and made x86_64 work with collecting AVX registers (https://sourceware.org/ml/gdb-patches/2016-02/msg00167.html), so that patch could do a lot of good already. Marcin Kościelnicki