summaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-05-04 04:15:33 +0000
committerKevin Buettner <kevinb@redhat.com>2001-05-04 04:15:33 +0000
commit1833b4efc52b4d056d843af95982b36ce34e8784 (patch)
tree2acb1651ccd4af0cc1272d37f373f1a63ac25ac8 /gdb/defs.h
parent0122230badabd76bac4af1754fe642ece1cb45c6 (diff)
downloadgdb-1833b4efc52b4d056d843af95982b36ce34e8784.tar.gz
Phase 1 of the ptid_t changes.gdb-post-ptid_t-2001-05-03
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 72f5184a842..166dde89471 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -843,6 +843,38 @@ enum val_prettyprint
/* Use the default setting which the user has specified. */
Val_pretty_default
};
+
+/* 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.
+
+ The present typedef is obviously quite naive with respect to
+ the magnitudes that real life pids and tids can take on and
+ will be replaced with something more robust shortly. */
+
+typedef int ptid_t;
+
+/* Convert a pid to a ptid_t. This macro is temporary and will
+ be replaced shortly. */
+
+#define pid_to_ptid(PID) ((ptid_t) MERGEPID ((PID),0))
+
+/* Define a value for the null (or zero) pid. This macro is temporary
+ and will go away shortly. */
+
+#define null_ptid (pid_to_ptid (0))
+
+/* Define a value for the -1 pid. This macro is temporary and will go
+ away shortly. */
+
+#define minus_one_ptid (pid_to_ptid (-1))
+
+/* Define a ptid comparison operator. This macro is temporary and will
+ be replaced with a real function shortly. */
+
+#define ptid_equal(PTID1,PTID2) ((PTID1) == (PTID2))
+
/* Optional host machine definition. Pure autoconf targets will not
@@ -1302,7 +1334,8 @@ extern void (*readline_end_hook) (void);
extern void (*register_changed_hook) (int regno);
extern void (*memory_changed_hook) (CORE_ADDR addr, int len);
extern void (*context_hook) (int);
-extern int (*target_wait_hook) (int pid, struct target_waitstatus * status);
+extern ptid_t (*target_wait_hook) (ptid_t ptid,
+ struct target_waitstatus * status);
extern void (*attach_hook) (void);
extern void (*detach_hook) (void);