summaryrefslogtreecommitdiff
path: root/gdb/inferior.h
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-05-15 00:03:38 +0000
committerKevin Buettner <kevinb@redhat.com>2001-05-15 00:03:38 +0000
commit11bc5832a9da5c23b3df59251c230c5bcce21f2f (patch)
tree50f0f065461a8b7af6dd698436b44c709296173d /gdb/inferior.h
parent2e9e5ed6071269ff915c1caa9a9735849fd7c15b (diff)
downloadgdb-11bc5832a9da5c23b3df59251c230c5bcce21f2f.tar.gz
Redefine ptid_t to be a struct rather than an int.
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r--gdb/inferior.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 91741975941..502d3efbcc9 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -51,6 +51,33 @@ extern void write_inferior_status_register (struct inferior_status
*inf_status, int regno,
LONGEST val);
+/* The -1 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;
+
+/* The null or zero ptid, often used to indicate no process. */
+extern ptid_t null_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. */
+ptid_t ptid_build (int pid, long lwp, long tid);
+
+/* Find/Create a ptid from just a pid. */
+ptid_t pid_to_ptid (int pid);
+
+/* 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. */
+long ptid_get_lwp (ptid_t 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 */
+extern int ptid_equal (ptid_t p1, ptid_t p2);
+
/* Save value of inferior_ptid so that it may be restored by
a later call to do_cleanups(). Returns the struct cleanup
pointer needed for later doing the cleanup. */