aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/nm-linux.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
commit39f770628a4eaf018fec8d55684bf2ec16ada9cc (patch)
tree69027cfb7df2ecc521ab2cc1d25a7dd6cbe56632 /gdb/config/nm-linux.h
parentb1af961c8433821f61dd1849cff9eb9a8bb974e8 (diff)
downloadgdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.zip
gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.gz
gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.bz2
Phase 1 of the ptid_t changes.
Diffstat (limited to 'gdb/config/nm-linux.h')
-rw-r--r--gdb/config/nm-linux.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/config/nm-linux.h b/gdb/config/nm-linux.h
index 131fd50..19d6857 100644
--- a/gdb/config/nm-linux.h
+++ b/gdb/config/nm-linux.h
@@ -41,7 +41,7 @@ struct objfile;
extern void linuxthreads_new_objfile (struct objfile *objfile);
/* Method to print a human-readable thread description */
-extern char *linuxthreads_pid_to_str (int pid);
+extern char *linuxthreads_pid_to_str (ptid_t ptid);
extern int linuxthreads_prepare_to_proceed (int step);
#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1)
@@ -52,7 +52,8 @@ extern int linuxthreads_prepare_to_proceed (int step);
/* Macros to extract process id and thread id from a composite pid/tid.
Allocate lower 19 bits for process id, next 12 bits for thread id, and
one bit for a flag to indicate a user thread vs. a kernel thread. */
-#define PIDGET(PID) (((PID) & 0xffff))
+#define PIDGET0(PID) (((PID) & 0xffff))
+#define PIDGET(PID) ((PIDGET0 (PID) == 0xffff) ? -1 : PIDGET0 (PID))
#define TIDGET(PID) (((PID) & 0x7fffffff) >> 16)
#define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16))