[v2,3/7] Documentation for gdb.thread_from_thread_handle

Message ID 20170408230700.3754771e@pinnacle.lan
State New, archived
Headers

Commit Message

Kevin Buettner April 9, 2017, 6:07 a.m. UTC
  gdb/doc/ChangeLog:
    
    	* python.texi (Threads In Python): Add description for function
    	gdb.thread_from_thread_handle.
---
 gdb/doc/python.texi | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Simon Marchi May 5, 2017, 4:01 a.m. UTC | #1
On 2017-04-09 02:07, Kevin Buettner wrote:
> gdb/doc/ChangeLog:
> 
>     	* python.texi (Threads In Python): Add description for function
>     	gdb.thread_from_thread_handle.
> ---
>  gdb/doc/python.texi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
> index ce5810e..81543d3 100644
> --- a/gdb/doc/python.texi
> +++ b/gdb/doc/python.texi
> @@ -3008,6 +3008,12 @@ This function returns the thread object for the
> selected thread.  If there
>  is no selected thread, this will return @code{None}.
>  @end defun
> 
> +@defun gdb.thread_from_thread_handle (thread_handle)
> +Return the thread object corresponding to the thread handle,
> +@var{thread_handle}, a thread library specific data structure such as

The comma before @var{thread_handle} feels unnecessary.  And I think you 
could shorten it to "... corresponding to @var{thread_handle}, ..." 
without loss of clarity.

> +@code{pthread_t} for pthreads library implementations.
> +@end defun
> +
>  A @code{gdb.InferiorThread} object has the following attributes:
> 
>  @defvar InferiorThread.name

Eli, do you have something to say about this patch?

Thanks,

Simon
  
Eli Zaretskii May 5, 2017, 6:17 a.m. UTC | #2
> Date: Fri, 05 May 2017 00:01:31 -0400
> From: Simon Marchi <simon.marchi@polymtl.ca>
> Cc: gdb-patches@sourceware.org, eliz@gnu.org
> 
> > +@defun gdb.thread_from_thread_handle (thread_handle)
> > +Return the thread object corresponding to the thread handle,
> > +@var{thread_handle}, a thread library specific data structure such as
> 
> The comma before @var{thread_handle} feels unnecessary.  And I think you 
> could shorten it to "... corresponding to @var{thread_handle}, ..." 
> without loss of clarity.

Both variants are OK.

> Eli, do you have something to say about this patch?

Sorry, I missed it at the time.  It's fine with me.

Thanks.
  
Kevin Buettner July 19, 2017, 12:13 a.m. UTC | #3
On Fri, 05 May 2017 00:01:31 -0400
Simon Marchi <simon.marchi@polymtl.ca> wrote:

> > +@defun gdb.thread_from_thread_handle (thread_handle)
> > +Return the thread object corresponding to the thread handle,
> > +@var{thread_handle}, a thread library specific data structure such as  
> 
> The comma before @var{thread_handle} feels unnecessary.  And I think you 
> could shorten it to "... corresponding to @var{thread_handle}, ..." 
> without loss of clarity.

I like your proposed (re)wording.  Since it's okay with Eli, that's
what I've incorporated into the new patch which I will post shortly.

Kevin
  

Patch

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index ce5810e..81543d3 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3008,6 +3008,12 @@  This function returns the thread object for the selected thread.  If there
 is no selected thread, this will return @code{None}.
 @end defun
 
+@defun gdb.thread_from_thread_handle (thread_handle)
+Return the thread object corresponding to the thread handle,
+@var{thread_handle}, a thread library specific data structure such as
+@code{pthread_t} for pthreads library implementations.
+@end defun
+
 A @code{gdb.InferiorThread} object has the following attributes:
 
 @defvar InferiorThread.name