libpthread_db.c (180982) | libpthread_db.c (181059) |
---|---|
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 180982 2008-07-30 00:59:19Z marcel $"); | 28__FBSDID("$FreeBSD: head/lib/libthread_db/libpthread_db.c 181059 2008-07-31 16:26:58Z marcel $"); |
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/linker_set.h> --- 28 unchanged lines hidden (view full) --- 65 case PS_NOFREGS: 66 return TD_NOFPREGS; 67 default: 68 return TD_ERR; 69 } 70} 71 72static long | 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/linker_set.h> --- 28 unchanged lines hidden (view full) --- 65 case PS_NOFREGS: 66 return TD_NOFPREGS; 67 default: 68 return TD_ERR; 69 } 70} 71 72static long |
73pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, int type) | 73pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, enum pt_type type) |
74{ 75 td_thragent_t *ta = __DECONST(td_thragent_t *, const_ta); 76 struct pt_map *new; 77 int i, first = -1; 78 79 /* leave zero out */ 80 for (i = 1; i < ta->map_len; ++i) { 81 if (ta->map[i].type == PT_NONE) { --- 986 unchanged lines hidden (view full) --- 1068{ 1069 1070 if (th->th_tid < 0 || th->th_tid >= th->th_ta->map_len || 1071 th->th_ta->map[th->th_tid].type == PT_NONE) 1072 return (TD_NOTHR); 1073 return (TD_OK); 1074} 1075 | 74{ 75 td_thragent_t *ta = __DECONST(td_thragent_t *, const_ta); 76 struct pt_map *new; 77 int i, first = -1; 78 79 /* leave zero out */ 80 for (i = 1; i < ta->map_len; ++i) { 81 if (ta->map[i].type == PT_NONE) { --- 986 unchanged lines hidden (view full) --- 1068{ 1069 1070 if (th->th_tid < 0 || th->th_tid >= th->th_ta->map_len || 1071 th->th_ta->map[th->th_tid].type == PT_NONE) 1072 return (TD_NOTHR); 1073 return (TD_OK); 1074} 1075 |
1076td_err_e | 1076static td_err_e |
1077pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset, 1078 psaddr_t *address) 1079{ 1080 const td_thragent_t *ta = th->th_ta; 1081 psaddr_t dtv_addr, obj_entry, tcb_addr; 1082 int tls_index, ret; 1083 1084 /* linkmap is a member of Obj_Entry */ --- 66 unchanged lines hidden --- | 1077pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset, 1078 psaddr_t *address) 1079{ 1080 const td_thragent_t *ta = th->th_ta; 1081 psaddr_t dtv_addr, obj_entry, tcb_addr; 1082 int tls_index, ret; 1083 1084 /* linkmap is a member of Obj_Entry */ --- 66 unchanged lines hidden --- |