Module Name: src Committed By: enami Date: Thu Apr 21 00:24:07 UTC 2011
Modified Files: src/sys/arch/x86/x86: db_trace.c Log Message: lwpaddr is a boolean variable and thus doesn't hold an address of lwp. Compare with correct value so that tr/t works again on current procecss. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/x86/db_trace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/db_trace.c diff -u src/sys/arch/x86/x86/db_trace.c:1.2 src/sys/arch/x86/x86/db_trace.c:1.3 --- src/sys/arch/x86/x86/db_trace.c:1.2 Mon Apr 11 04:22:31 2011 +++ src/sys/arch/x86/x86/db_trace.c Thu Apr 21 00:24:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: db_trace.c,v 1.2 2011/04/11 04:22:31 mrg Exp $ */ +/* $NetBSD: db_trace.c,v 1.3 2011/04/21 00:24:07 enami Exp $ */ /* * Mach Operating System @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.2 2011/04/11 04:22:31 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.3 2011/04/21 00:24:07 enami Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -158,13 +158,13 @@ return; } db_read_bytes((db_addr_t)pp, sizeof(p), (char *)&p); - db_read_bytes((db_addr_t)p.p_lwps.lh_first, - sizeof(l), (char *)&l); + addr = (db_addr_t)p.p_lwps.lh_first; + db_read_bytes(addr, sizeof(l), (char *)&l); } (*pr)("lid %d ", l.l_lid); pcb = lwp_getpcb(&l); #ifdef _KERNEL - if (l.l_proc == curproc && (lwp_t *)lwpaddr == curlwp) + if (l.l_proc == curproc && (lwp_t *)addr == curlwp) set_frame_callpc(); else #endif