summaryrefslogtreecommitdiff
path: root/gdb/config/i386/tm-i386v42mp.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/config/i386/tm-i386v42mp.h')
-rw-r--r--gdb/config/i386/tm-i386v42mp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/config/i386/tm-i386v42mp.h b/gdb/config/i386/tm-i386v42mp.h
index e6588e4fd93..e70bc4d424d 100644
--- a/gdb/config/i386/tm-i386v42mp.h
+++ b/gdb/config/i386/tm-i386v42mp.h
@@ -43,7 +43,8 @@
#define PIDBITS 16
/* Return the process id stored in composite PID. */
-#define PIDGET(PID) (((PID) & ((1 << PIDBITS) - 1)))
+#define PIDGET0(PID) (((PID) & ((1 << PIDBITS) - 1)))
+#define PIDGET(PID) ((PIDGET0 (PID) == ((1 << PIDBITS) -1)) ? -1 : PIDGET0 (PID))
/* Return the thread or lwp id stored in composite PID. */
#define TIDGET(PID) (((PID) & 0x3fffffff) >> PIDBITS)