Phase 1 of the ptid_t changes.
[deliverable/binutils-gdb.git] / gdb / config / nm-linux.h
index 131fd502fc439694b444d928401cd935d30a87ae..19d685776f6ee5d94454eba3354fc88395e5fe63 100644 (file)
@@ -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))
 
This page took 0.025552 seconds and 4 git commands to generate.