diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
commit | 39f770628a4eaf018fec8d55684bf2ec16ada9cc (patch) | |
tree | 69027cfb7df2ecc521ab2cc1d25a7dd6cbe56632 /gdb/defs.h | |
parent | b1af961c8433821f61dd1849cff9eb9a8bb974e8 (diff) | |
download | gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.zip gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.gz gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.bz2 |
Phase 1 of the ptid_t changes.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r-- | gdb/defs.h | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -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); |