From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117522 invoked by alias); 28 Feb 2019 02:24:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 117150 invoked by uid 89); 28 Feb 2019 02:24:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=pierce, Hx-languages-length:1208, five 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, 28 Feb 2019 02:24:20 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 98A453132C5F for ; Thu, 28 Feb 2019 02:24:17 +0000 (UTC) Received: from f29-4.lan (ovpn-117-11.phx2.redhat.com [10.3.117.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 778D019C71 for ; Thu, 28 Feb 2019 02:24:17 +0000 (UTC) Date: Thu, 28 Feb 2019 02:24:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [PATCH v2 0/5] Add python method gdb.InferiorThread.thread_handle Message-ID: <20190227192416.613752c8@f29-4.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00554.txt.bz2 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