Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gdb/dist/gdb - In the thread activation code, ...
details: https://anonhg.NetBSD.org/src/rev/04b371c917cb
branches: trunk
changeset: 778744:04b371c917cb
user: christos <christos%NetBSD.org@localhost>
date: Wed Apr 11 21:41:59 2012 +0000
description:
- In the thread activation code, mutate the main thread (lid=0) to lid=1 like
the kernel does.
- Remove - 1 hack
- Remove more ifdef notdef code
diffstat:
external/gpl3/gdb/dist/gdb/nbsd-thread.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diffs (49 lines):
diff -r 970e5e2aa659 -r 04b371c917cb external/gpl3/gdb/dist/gdb/nbsd-thread.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-thread.c Wed Apr 11 21:39:01 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-thread.c Wed Apr 11 21:41:59 2012 +0000
@@ -88,7 +88,7 @@
#define IS_LWP(ptid) (GET_LWP (ptid) != 0)
-#define BUILD_LWP(lwp, ptid) ptid_build (GET_PID(ptid), (lwp) - 1, 0)
+#define BUILD_LWP(lwp, ptid) ptid_build (GET_PID(ptid), (lwp), 0)
static td_proc_t *main_ta;
@@ -143,6 +143,7 @@
nbsd_thread_active = 1;
main_ptid = inferior_ptid;
cached_thread = minus_one_ptid;
+ thread_change_ptid(inferior_ptid, BUILD_LWP(1, inferior_ptid));
nbsd_find_new_threads (NULL);
inferior_ptid = find_active_thread ();
}
@@ -279,8 +280,6 @@
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
{
@@ -529,9 +528,6 @@
{
int retval;
ptid_t ptid;
-#ifdef notyet
- td_thread_t *thread;
-#endif
if (nbsd_thread_active == 0)
return;
@@ -550,9 +546,6 @@
while ((retval != -1) && pl.pl_lwpid != 0)
{
ptid = BUILD_LWP (pl.pl_lwpid, main_ptid);
-#ifdef notyet
- td_map_lwp2thr (main_ta, pl.pl_lwpid, &thread);
-#endif
if (!in_thread_list (ptid))
add_thread (ptid);
retval = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)&pl, sizeof(pl));
Home |
Main Index |
Thread Index |
Old Index