Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Add python method gdb.InferiorThread.handle
@ 2019-03-21  4:32 Kevin Buettner
  2019-03-21  4:42 ` [PATCH v3 1/6] Introduce target_ops method thread_info_to_thread_handle Kevin Buettner
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Kevin Buettner @ 2019-03-21  4:32 UTC (permalink / raw)
  To: gdb-patches

This six part series adds a python method named "handle" which is used
to obtain the thread handle from a thread object.

It will eventually be used as part of the implementation of the
"thread parent" operation for the OpenMP work that I've been doing.

While thread handles are normally opaque, for my OpenMP work, it's
become necessary to convert a handle to a form upon which arithmetic
may be performed.  Via some simple arithmetic manipulations, it's
possible to find the handle associated with a GOMP thread.  If you want
details on this, see:

https://www.sourceware.org/ml/gdb-patches/2018-09/msg00719.html

This is version 3 of a series that I first posted in Sept, 2018.

In v1, InferiorThread.thread_handle was passed a type and returned
a gdb.Value object representing the handle (of the type passed in).

In v2, InferiorThread.thread_handle is a nullary method.  It returns
the thread handle represented as a Python bytes object.  If it's
necessary to pierce the opacity of this object, as it is for my use
case, the two argument form of the gdb.Value constructor may be used
to make an object of some suitable type.

In v3, this version, the name has been changed to "handle" instead of
"thread_handle" at the suggestion of Tom Tromey.  I've also fixed a
few other small problems identified by Tom.  Also, in order to stay
consistent with the new naming, "thread_from_thread_handle", an
existing python method, has been renamed to "thread_from_handle".  The
old name may still be used, but is considered deprecated.

Kevin


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-03-27 20:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21  4:32 [PATCH v3 0/6] Add python method gdb.InferiorThread.handle Kevin Buettner
2019-03-21  4:42 ` [PATCH v3 1/6] Introduce target_ops method thread_info_to_thread_handle Kevin Buettner
2019-03-27 20:19   ` Tom Tromey
2019-03-21  4:45 ` [PATCH v3 2/6] Add python method InferiorThread.handle Kevin Buettner
2019-03-27 20:21   ` Tom Tromey
2019-03-21  4:46 ` [PATCH v3 3/6] Support buffer objects as handles in Inferior.thread_from_thread_handle() Kevin Buettner
2019-03-21  4:48 ` [PATCH v3 4/6] Tests for gdb.InferiorThread.handle Kevin Buettner
2019-03-21  4:49 ` [PATCH v3 5/6] Documentation for python method InferiorThread.handle Kevin Buettner
2019-03-21 14:19   ` Eli Zaretskii
2019-03-21  4:52 ` [PATCH v3 6/6] Rename python function thread_from_thread_handle to thread_from_handle Kevin Buettner
2019-03-21 14:21   ` Eli Zaretskii
2019-03-21 17:09     ` Kevin Buettner
2019-03-21 18:26       ` Eli Zaretskii
2019-03-27 20:27 ` [PATCH v3 0/6] Add python method gdb.InferiorThread.handle Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox