From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18631 invoked by alias); 2 Oct 2014 21:34:29 -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 18622 invoked by uid 89); 2 Oct 2014 21:34:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,LIKELY_SPAM_BODY,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Oct 2014 21:34:27 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s92LYNDN004952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 Oct 2014 17:34:24 -0400 Received: from localhost (dhcp-10-15-16-169.yyz.redhat.com [10.15.16.169]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s92LYMGX027440 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 2 Oct 2014 17:34:23 -0400 From: Sergio Durigan Junior To: "Jose E. Marchesi" Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 4/9] New gdbarch functions: dtrace_probe_argument, dtrace_probe_is_enabled, dtrace_enable_probe, dtrace_disable_probe. References: <1411724905-31234-1-git-send-email-jose.marchesi@oracle.com> <1411724905-31234-5-git-send-email-jose.marchesi@oracle.com> X-URL: http://blog.sergiodj.net Date: Thu, 02 Oct 2014 21:34:00 -0000 In-Reply-To: <1411724905-31234-5-git-send-email-jose.marchesi@oracle.com> (Jose E. Marchesi's message of "Fri, 26 Sep 2014 11:48:20 +0200") Message-ID: <874mvmupep.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00044.txt.bz2 On Friday, September 26 2014, Jose E. Marchesi wrote: > This patch adds several gdbarch functions (along with the > corresponding predicates): `dtrace_probe_argument', > `dtrace_probe_is_enabled', `dtrace_enable_probe' and > `dtrace_disable_probe'. These functions will be implemented by > target-specific code, and called from the DTrace probes implementation > in order to calculate the value of probe arguments, and manipulate > is-enabled probes. Thanks for the patch. Comments below. > diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh > index 2a8bca8..0458134 100755 > --- a/gdb/gdbarch.sh > +++ b/gdb/gdbarch.sh > @@ -944,6 +944,21 @@ M:int:stap_is_single_operand:const char *s:s > # parser), and should advance the buffer pointer (p->arg). > M:int:stap_parse_special_token:struct stap_parse_info *p:p > > +# DTrace related functions. > + > +# The expression to compute the NARTGth+1 argument to a DTrace USDT probe. > +# NARG must be >= 0. > +M:void:dtrace_probe_argument:struct parser_state *pstate, int narg:pstate, narg This function is responsible for parsing the argument, right? I'd prefer if you named it "dtrace_parse_probe_argument". WDYT? > +# True if the given ADDR does not contain the instruction sequence > +# corresponding to a disabled DTrace is-enabled probe. > +M:int:dtrace_probe_is_enabled:CORE_ADDR addr:addr > + > +# Enable a DTrace is-enabled probe at ADDR. > +M:void:dtrace_enable_probe:CORE_ADDR addr:addr > + > +# Disable a DTrace is-enabled probe at ADDR. > +M:void:dtrace_disable_probe:CORE_ADDR addr:addr > > # True if the list of shared libraries is one and only for all > # processes, as opposed to a list of shared libraries per inferior. > @@ -1146,6 +1161,7 @@ struct syscall; > struct agent_expr; > struct axs_value; > struct stap_parse_info; > +struct parser_state; > struct ravenscar_arch_ops; > struct elf_internal_linux_prpsinfo; -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/