| Index: gdb/common/ptid.h
|
| diff --git a/gdb/common/ptid.h b/gdb/common/ptid.h
|
| index 243f4ab775c3e879b8eba541d960908f2e301b0d..2a31a1c02a1a164b12052da4120de04f3055bc24 100644
|
| --- a/gdb/common/ptid.h
|
| +++ b/gdb/common/ptid.h
|
| @@ -1,6 +1,6 @@
|
| /* The ptid_t type and common functions operating on it.
|
|
|
| - Copyright (C) 1986, 1988-2012 Free Software Foundation, Inc.
|
| + Copyright (C) 1986-2013 Free Software Foundation, Inc.
|
|
|
| This file is part of GDB.
|
|
|
| @@ -20,66 +20,62 @@
|
| #ifndef PTID_H
|
| #define PTID_H
|
|
|
| -/* The ptid struct is a collection of the various "ids" necessary
|
| - for identifying the inferior. This consists of the process id
|
| - (pid), thread id (tid), and other fields necessary for uniquely
|
| - identifying the inferior process/thread being debugged. When
|
| - manipulating ptids, the constructors, accessors, and predicate
|
| - declared in server.h should be used. These are as follows:
|
| -
|
| - ptid_build - Make a new ptid from a pid, lwp, and tid.
|
| - pid_to_ptid - Make a new ptid from just a pid.
|
| - ptid_get_pid - Fetch the pid component of a ptid.
|
| - ptid_get_lwp - Fetch the lwp component of a ptid.
|
| - ptid_get_tid - Fetch the tid component of a ptid.
|
| - ptid_equal - Test to see if two ptids are equal.
|
| -
|
| - Please do NOT access the struct ptid members directly (except, of
|
| - course, in the implementation of the above ptid manipulation
|
| - functions). */
|
| +/* The ptid struct is a collection of the various "ids" necessary for
|
| + identifying the inferior process/thread being debugged. This
|
| + 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. */
|
|
|
| struct ptid
|
| - {
|
| - /* Process id */
|
| - int pid;
|
| +{
|
| + /* Process id. */
|
| + int pid;
|
|
|
| - /* Lightweight process id */
|
| - long lwp;
|
| + /* Lightweight process id. */
|
| + long lwp;
|
|
|
| - /* Thread id */
|
| - long tid;
|
| - };
|
| + /* Thread id. */
|
| + long tid;
|
| +};
|
|
|
| typedef struct ptid ptid_t;
|
|
|
| /* The null or zero ptid, often used to indicate no process. */
|
| extern ptid_t null_ptid;
|
|
|
| -/* The -1 ptid, often used to indicate either an error condition
|
| +/* The (-1,0,0) ptid, often used to indicate either an error condition
|
| or a "don't care" condition, i.e, "run all threads." */
|
| extern ptid_t minus_one_ptid;
|
|
|
| -/* Attempt to find and return an existing ptid with the given PID, LWP,
|
| - and TID components. If none exists, create a new one and return
|
| - that. */
|
| +/* Make a ptid given the necessary PID, LWP, and TID components. */
|
| ptid_t ptid_build (int pid, long lwp, long tid);
|
|
|
| -/* Find/Create a ptid from just a pid. */
|
| +/* Make a new ptid from just a pid. This ptid is usually used to
|
| + represent a whole process, including all its lwps/threads. */
|
| ptid_t pid_to_ptid (int pid);
|
|
|
| -/* Fetch the pid (process id) component from a ptid. */
|
| +/* Fetch the pid (process id) component from a ptid. */
|
| int ptid_get_pid (ptid_t ptid);
|
|
|
| -/* Fetch the lwp (lightweight process) component from a ptid. */
|
| +/* Fetch the lwp (lightweight process) component from a ptid. */
|
| long ptid_get_lwp (ptid_t ptid);
|
|
|
| -/* Fetch the tid (thread id) component from a ptid. */
|
| +/* Fetch the tid (thread id) component from a ptid. */
|
| long ptid_get_tid (ptid_t ptid);
|
|
|
| -/* Compare two ptids to see if they are equal */
|
| -int ptid_equal (ptid_t p1, ptid_t p2);
|
| +/* Compare two ptids to see if they are equal. */
|
| +int ptid_equal (ptid_t ptid1, ptid_t ptid2);
|
|
|
| -/* Return true if PTID represents a process id. */
|
| +/* Returns true if PTID represents a whole process, including all its
|
| + lwps/threads. Such ptids have the form of (pid,0,0), with pid !=
|
| + -1. */
|
| int ptid_is_pid (ptid_t ptid);
|
|
|
| +/* Return true if PTID's lwp member is non-zero. */
|
| +int ptid_lwp_p (ptid_t ptid);
|
| +
|
| +/* Return true if PTID's tid member is non-zero. */
|
| +int ptid_tid_p (ptid_t ptid);
|
| +
|
| #endif
|
|
|