libpthread_db.c (155387) | libpthread_db.c (155411) |
---|---|
1/* 2 * Copyright (c) 2004 David Xu <davidxu@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2004 David Xu <davidxu@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/lib/libthread_db/libpthread_db.c 155387 2006-02-06 11:54:19Z davidxu $"); | 28__FBSDID("$FreeBSD: head/lib/libthread_db/libpthread_db.c 155411 2006-02-07 02:12:33Z davidxu $"); |
29 30#include <stddef.h> 31#include <stdlib.h> 32#include <string.h> 33#include <unistd.h> 34#include <pthread.h> 35#include <sys/types.h> 36#include <sys/kse.h> --- 222 unchanged lines hidden (view full) --- 259 /* get next thread */ 260 ret = ps_pread(ta->ph, 261 pt + ta->thread_off_next, 262 &pt, sizeof(pt)); 263 if (ret != 0) 264 return (P2T(ret)); 265 } 266 /* check lwp */ | 29 30#include <stddef.h> 31#include <stdlib.h> 32#include <string.h> 33#include <unistd.h> 34#include <pthread.h> 35#include <sys/types.h> 36#include <sys/kse.h> --- 222 unchanged lines hidden (view full) --- 259 /* get next thread */ 260 ret = ps_pread(ta->ph, 261 pt + ta->thread_off_next, 262 &pt, sizeof(pt)); 263 if (ret != 0) 264 return (P2T(ret)); 265 } 266 /* check lwp */ |
267 ret = ptrace(PT_GETREGS, ta->map[id].lwp, (caddr_t)&gregs, 0); 268 if (ret != 0) { | 267 ret = ps_lgetregs(ta->ph, ta->map[id].lwp, gregs); 268 if (ret != PS_OK) { |
269 /* no longer exists */ 270 ta->map[id].type = PT_NONE; 271 return (TD_NOTHR); 272 } 273 } else { 274 while (pt != 0 && ta->map[id].thr != pt) { 275 ret = ps_pread(ta->ph, 276 pt + ta->thread_off_tcb, --- 837 unchanged lines hidden --- | 269 /* no longer exists */ 270 ta->map[id].type = PT_NONE; 271 return (TD_NOTHR); 272 } 273 } else { 274 while (pt != 0 && ta->map[id].thr != pt) { 275 ret = ps_pread(ta->ph, 276 pt + ta->thread_off_tcb, --- 837 unchanged lines hidden --- |