Module Name: src
Committed By: christos
Date: Thu Mar 22 16:06:02 UTC 2012
Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-thread.c
Log Message:
only +1 for the 0'th thread (if we did not find any other)
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/nbsd-thread.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.11 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.12
--- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.11 Thu Mar 22 11:26:32 2012
+++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Thu Mar 22 12:06:01 2012
@@ -328,13 +328,15 @@ find_active_thread (void)
while ((val != -1) && (pl.pl_lwpid != 0) &&
(pl.pl_event != PL_EVENT_SIGNAL))
val = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)&pl, sizeof(pl));
+ if (pl.pl_lwpid == 0)
+ pl.pl_lwpid = 1;
}
else
{
return inferior_ptid;
}
- cached_thread = BUILD_LWP (pl.pl_lwpid + 1, main_ptid);
+ cached_thread = BUILD_LWP (pl.pl_lwpid, main_ptid);
return cached_thread;
}