From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21255 invoked by alias); 12 Feb 2014 14:07:07 -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 21101 invoked by uid 89); 12 Feb 2014 14:07:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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; Wed, 12 Feb 2014 14:07:05 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1CE74bS020388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Feb 2014 09:07:04 -0500 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s1CE70rH012701 for ; Wed, 12 Feb 2014 09:07:03 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 2/2] common/ptid.h: Mention that process_stratum targets should prefer ptid.lwp. Date: Wed, 12 Feb 2014 14:07:00 -0000 Message-Id: <1392214020-21478-3-git-send-email-palves@redhat.com> In-Reply-To: <1392214020-21478-1-git-send-email-palves@redhat.com> References: <1392214020-21478-1-git-send-email-palves@redhat.com> X-SW-Source: 2014-02/txt/msg00411.txt.bz2 It's best that we standardize on process_stratum targets using the ptid.lwp field to store thread ids. The idea being leave the ptid.tid field free for any thread_stratum target that might want to sit on top. gdb/ 2014-02-12 Pedro Alves * common/ptid.h (struct ptid): Mention that process_stratum targets should prefer ptid.lwp. --- gdb/common/ptid.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/common/ptid.h b/gdb/common/ptid.h index 362882d..cc1825e 100644 --- a/gdb/common/ptid.h +++ b/gdb/common/ptid.h @@ -25,7 +25,12 @@ consists of the process id (pid), lightweight process id (lwp) and thread id (tid). When manipulating ptids, the constructors, accessors, and predicates declared in this file should be used. Do - NOT access the struct ptid members directly. */ + NOT access the struct ptid members directly. + + process_stratum targets that handle threading themselves should + prefer using the ptid.lwp field, leaving the ptid.tid field for any + thread_stratum target that might want to sit on top. +*/ struct ptid { -- 1.7.11.7