This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 2/2] common/ptid.h: Mention that process_stratum targets should prefer ptid.lwp.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 12 Feb 2014 14:07:00 +0000
- Subject: [PATCH 2/2] common/ptid.h: Mention that process_stratum targets should prefer ptid.lwp.
- Authentication-results: sourceware.org; auth=none
- References: <1392214020-21478-1-git-send-email-palves at redhat dot com>
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 <palves@redhat.com>
* 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