From patchwork Thu May 16 20:34:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 32728 Received: (qmail 21140 invoked by alias); 16 May 2019 20:35:15 -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 21092 invoked by uid 89); 16 May 2019 20:35:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= 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 ESMTP; Thu, 16 May 2019 20:35:13 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F69A308213C for ; Thu, 16 May 2019 20:35:12 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 284E65C70A; Thu, 16 May 2019 20:35:12 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Sergio Durigan Junior Subject: [FYI 2/5] Update some comments on stap-probe.c Date: Thu, 16 May 2019 16:34:58 -0400 Message-Id: <20190516203501.25992-3-sergiodj@redhat.com> In-Reply-To: <20190516203501.25992-1-sergiodj@redhat.com> References: <20190516203501.25992-1-sergiodj@redhat.com> X-IsSubscribed: yes Some functions's comments were not entirely correct on stap-probe.c, so this patch updates them. Pushed as obvious. gdb/ChangeLog: 2019-05-16 Sergio Durigan Junior * stap-probe.c (stap_get_opcode): Update comment. (stap_get_expected_argument_type): Likewise. (handle_stap_probe): Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/stap-probe.c | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8d40fc95ea..3389167adb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-05-16 Sergio Durigan Junior + + * stap-probe.c (stap_get_opcode): Update comment. + (stap_get_expected_argument_type): Likewise. + (handle_stap_probe): Likewise. + 2019-05-16 Sergio Durigan Junior * i386-tdep.c (i386_stap_parse_special_token_triplet): Change diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c index 89cd780747..bc2f9fc85b 100644 --- a/gdb/stap-probe.c +++ b/gdb/stap-probe.c @@ -316,8 +316,9 @@ stap_get_operator_prec (enum exp_opcode op) } } -/* Given S, read the operator in it and fills the OP pointer with its code. - Return 1 on success, zero if the operator was not recognized. */ +/* Given S, read the operator in it. Return the EXP_OPCODE which + represents the operator detected, or throw an error if no operator + was found. */ static enum exp_opcode stap_get_opcode (const char **s) @@ -422,7 +423,8 @@ stap_get_opcode (const char **s) } /* Given the bitness of the argument, represented by B, return the - corresponding `struct type *'. */ + corresponding `struct type *', or throw an error if B is + unknown. */ static struct type * stap_get_expected_argument_type (struct gdbarch *gdbarch, @@ -1491,10 +1493,7 @@ stap_probe::gen_info_probes_table_values () const probe doesn't have an associated semaphore; - Probe's provider name; - Probe's name; - - Probe's argument format - - This function returns 1 if the handling was successful, and zero - otherwise. */ + - Probe's argument format. */ static void handle_stap_probe (struct objfile *objfile, struct sdt_note *el,