public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Update some comments on stap-probe.c
Date: Thu, 16 May 2019 20:31:00 -0000	[thread overview]
Message-ID: <20190516203135.11879.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3ca58cdea13ddad01d70aa170eb419903b241b94

commit 3ca58cdea13ddad01d70aa170eb419903b241b94
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Thu May 16 16:11:20 2019 -0400

    Update some comments on stap-probe.c
    
    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  <sergiodj@redhat.com>
    
    	* stap-probe.c (stap_get_opcode): Update comment.
    	(stap_get_expected_argument_type): Likewise.
    	(handle_stap_probe): Likewise.

Diff:
---
 gdb/ChangeLog    |  6 ++++++
 gdb/stap-probe.c | 13 ++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8d40fc9..3389167 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2019-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
 
+	* stap-probe.c (stap_get_opcode): Update comment.
+	(stap_get_expected_argument_type): Likewise.
+	(handle_stap_probe): Likewise.
+
+2019-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
+
 	* i386-tdep.c (i386_stap_parse_special_token_triplet): Change
 	return type to 'bool'.  Adjust comment.  Use 'bool' when
 	appropriate.
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 89cd780..bc2f9fc 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,


                 reply	other threads:[~2019-05-16 20:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190516203135.11879.qmail@sourceware.org \
    --to=sergiodj@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).