From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11383 invoked by alias); 15 Jun 2016 14:59:37 -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 11369 invoked by uid 89); 15 Jun 2016 14:59:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Antoine, antoine, Adapt, Tremblay X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (159.100.250.38) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jun 2016 14:59:26 +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 B7A8E1A224; Wed, 15 Jun 2016 14:59:23 +0000 (UTC) Received: from [192.168.43.80] (public-gprs356789.centertel.pl [37.47.24.246]) by hogfather.0x04.net (Postfix) with ESMTPSA id 422A45800F9; Wed, 15 Jun 2016 16:59:23 +0200 (CEST) Subject: Re: [PATCH v2 10/17] gdbserver: pass pointer to struct tracepoint to install_fast_tracepoint_jump_pad To: Antoine Tremblay , gdb-patches@sourceware.org References: <1465476975-25062-1-git-send-email-antoine.tremblay@ericsson.com> <1465476975-25062-11-git-send-email-antoine.tremblay@ericsson.com> Cc: Simon Marchi From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <3c04a051-f12a-c757-60be-2b666b1a770f@0x04.net> Date: Wed, 15 Jun 2016 14:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1465476975-25062-11-git-send-email-antoine.tremblay@ericsson.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00266.txt.bz2 On 09/06/16 14:56, Antoine Tremblay wrote: > From: Simon Marchi > > We currently pass many values to install_fast_tracepoint_jump_pad that > come from fields of struct tracepoint, and we plan to add another (the > kind field). It would be simpler to just pass a pointer to the > tracepoint and have install_fast_tracepoint_jump_pad fetch the fields > from it. > > That requires moving the struct tracepoint definition to tracepoint.h. > > gdb/gdbserver/ChangeLog: > > * linux-aarch64-low.c (aarch64_install_fast_tracepoint_jump_pad): > Replaces some parameters with a struct tracepoint *. The same needs to be done for s390 and powerpc. > * linux-low.c (linux_install_fast_tracepoint_jump_pad): > Likewise. > * linux-low.h (struct linux_target_ops) > : Likewise. > * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Likewise. > (i386_install_fast_tracepoint_jump_pad): Likewise. > (x86_install_fast_tracepoint_jump_pad): Likewise. > * target.h (struct tracepoint): New forward declaration. > (struct target_ops) : Replace > some parameters with a struct tracepoint *. > (install_fast_tracepoint_jump_pad): Likewise. > * tracepoint.c (enum tracepoint_type): Move to tracepoint.h. > (struct tracepoint): Likewise. > (install_fast_tracepoint): Adapt call to > install_fast_tracepoint_jump_pad. > * tracepoint.h (enum tracepoint_type) Moved from tracepoint.c. > (struct tracepoint): Moved from tracepoint.c. > --- > gdb/gdbserver/linux-aarch64-low.c | 26 ++++---- > gdb/gdbserver/linux-arm-low.c | 2 + > gdb/gdbserver/linux-low.c | 12 +--- > gdb/gdbserver/linux-low.h | 5 +- > gdb/gdbserver/linux-x86-low.c | 63 ++++++++---------- > gdb/gdbserver/target.h | 26 ++++---- > gdb/gdbserver/tracepoint.c | 131 +------------------------------------- > gdb/gdbserver/tracepoint.h | 125 ++++++++++++++++++++++++++++++++++++ > 8 files changed, 179 insertions(+), 211 deletions(-)