From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 0/5] Add python method gdb.InferiorThread.thread_handle
Date: Thu, 28 Feb 2019 02:24:00 -0000 [thread overview]
Message-ID: <20190227192416.613752c8@f29-4.lan> (raw)
This five part series adds a python method named "thread_handle"
which is used to fetch 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 2 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.
Kevin
next reply other threads:[~2019-02-28 2:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 2:24 Kevin Buettner [this message]
2019-02-28 2:30 ` [PATCH v2 1/5] Introduce target_ops method thread_info_to_thread_handle Kevin Buettner
2019-03-05 21:44 ` Tom Tromey
2019-02-28 2:31 ` [PATCH v2 2/5] Add python method InferiorThread.thread_handle Kevin Buettner
2019-03-05 21:48 ` Tom Tromey
2019-03-20 20:24 ` Kevin Buettner
2019-03-20 20:39 ` Tom Tromey
2019-03-20 20:48 ` Kevin Buettner
2019-02-28 2:32 ` [PATCH v2 3/5] Support buffer objects as handles in Inferior.thread_from_thread_handle() Kevin Buettner
2019-03-05 21:51 ` Tom Tromey
2019-02-28 2:34 ` [PATCH v2 4/5] Tests for gdb.InferiorThread.thread_handle Kevin Buettner
2019-03-05 21:54 ` Tom Tromey
2019-02-28 2:35 ` [PATCH v2 5/5] Documentation for python method InferiorThread.thread_handle Kevin Buettner
2019-02-28 18:06 ` Eli Zaretskii
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=20190227192416.613752c8@f29-4.lan \
--to=kevinb@redhat.com \
--cc=gdb-patches@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