2 * Copyright (c) 2004 David Xu <davidxu@freebsd.org>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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
27 #include <sys/cdefs.h>
28 __FBSDID("$FreeBSD$");
35 #include <sys/types.h>
37 #include <sys/ptrace.h>
38 #include <proc_service.h>
39 #include <thread_db.h>
41 #include "libpthread_db.h"
43 #define P2T(c) ps2td(c)
45 static void pt_unmap_lwp(const td_thragent_t *ta, lwpid_t lwp);
46 static int pt_validate(const td_thrhandle_t *th);
63 return TD_NOLIBTHREAD;
72 pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, int type)
74 td_thragent_t *ta = __DECONST(td_thragent_t *, const_ta);
79 for (i = 1; i < ta->map_len; ++i) {
80 if (ta->map[i].type == PT_NONE) {
83 } else if (ta->map[i].type == type && ta->map[i].thr == pt) {
89 if (ta->map_len == 0) {
90 ta->map = calloc(20, sizeof(struct pt_map));
96 new = realloc(ta->map,
97 sizeof(struct pt_map) * ta->map_len * 2);
100 memset(new + ta->map_len, '\0', sizeof(struct pt_map) *
108 ta->map[first].type = type;
109 ta->map[first].thr = pt;
121 pt_ta_new(struct ps_prochandle *ph, td_thragent_t **pta)
123 #define LOOKUP_SYM(proc, sym, addr) \
124 ret = ps_pglobal_lookup(proc, NULL, sym, addr); \
126 TDBG("can not find symbol: %s\n", sym); \
127 ret = TD_NOLIBTHREAD; \
131 #define LOOKUP_VAL(proc, sym, val) \
132 ret = ps_pglobal_lookup(proc, NULL, sym, &vaddr);\
134 TDBG("can not find symbol: %s\n", sym); \
135 ret = TD_NOLIBTHREAD; \
138 ret = ps_pread(proc, vaddr, val, sizeof(int)); \
140 TDBG("can not read value of %s\n", sym);\
141 ret = TD_NOLIBTHREAD; \
152 ta = malloc(sizeof(td_thragent_t));
157 ta->thread_activated = 0;
161 LOOKUP_SYM(ph, "_libkse_debug", &ta->libkse_debug_addr);
162 LOOKUP_SYM(ph, "_thread_list", &ta->thread_list_addr);
163 LOOKUP_SYM(ph, "_thread_activated", &ta->thread_activated_addr);
164 LOOKUP_SYM(ph, "_thread_active_threads",&ta->thread_active_threads_addr);
165 LOOKUP_SYM(ph, "_thread_keytable", &ta->thread_keytable_addr);
166 LOOKUP_VAL(ph, "_thread_off_dtv", &ta->thread_off_dtv);
167 LOOKUP_VAL(ph, "_thread_off_kse_locklevel", &ta->thread_off_kse_locklevel);
168 LOOKUP_VAL(ph, "_thread_off_kse", &ta->thread_off_kse);
169 LOOKUP_VAL(ph, "_thread_off_tlsindex", &ta->thread_off_tlsindex);
170 LOOKUP_VAL(ph, "_thread_off_attr_flags", &ta->thread_off_attr_flags);
171 LOOKUP_VAL(ph, "_thread_size_key", &ta->thread_size_key);
172 LOOKUP_VAL(ph, "_thread_off_tcb", &ta->thread_off_tcb);
173 LOOKUP_VAL(ph, "_thread_off_linkmap", &ta->thread_off_linkmap);
174 LOOKUP_VAL(ph, "_thread_off_tmbx", &ta->thread_off_tmbx);
175 LOOKUP_VAL(ph, "_thread_off_thr_locklevel", &ta->thread_off_thr_locklevel);
176 LOOKUP_VAL(ph, "_thread_off_next", &ta->thread_off_next);
177 LOOKUP_VAL(ph, "_thread_off_state", &ta->thread_off_state);
178 LOOKUP_VAL(ph, "_thread_max_keys", &ta->thread_max_keys);
179 LOOKUP_VAL(ph, "_thread_off_key_allocated", &ta->thread_off_key_allocated);
180 LOOKUP_VAL(ph, "_thread_off_key_destructor", &ta->thread_off_key_destructor);
181 LOOKUP_VAL(ph, "_thread_state_running", &ta->thread_state_running);
182 LOOKUP_VAL(ph, "_thread_state_zoombie", &ta->thread_state_zoombie);
185 * If this fails it probably means we're debugging a core file and
188 ps_pwrite(ph, ta->libkse_debug_addr, &dbg, sizeof(int));
198 pt_ta_delete(td_thragent_t *ta)
206 * Error returns from this write are not really a problem;
207 * the process doesn't exist any more.
209 ps_pwrite(ta->ph, ta->libkse_debug_addr, &dbg, sizeof(int));
217 pt_ta_map_id2thr(const td_thragent_t *ta, thread_t id, td_thrhandle_t *th)
220 TAILQ_HEAD(, pthread) thread_list;
221 psaddr_t pt, tcb_addr;
227 if (id < 0 || id >= ta->map_len || ta->map[id].type == PT_NONE)
229 ret = ps_pread(ta->ph, ta->thread_list_addr, &thread_list,
230 sizeof(thread_list));
233 pt = (psaddr_t)thread_list.tqh_first;
234 if (ta->map[id].type == PT_LWP) {
236 * if we are referencing a lwp, make sure it was not already
237 * mapped to user thread.
240 ret = ps_pread(ta->ph,
241 pt + ta->thread_off_tcb,
242 &tcb_addr, sizeof(tcb_addr));
245 ret = ps_pread(ta->ph,
246 tcb_addr + ta->thread_off_tmbx +
247 offsetof(struct kse_thr_mailbox, tm_lwp),
252 * If the lwp was already mapped to userland thread,
253 * we shouldn't reference it directly in future.
255 if (lwp == ta->map[id].lwp) {
256 ta->map[id].type = PT_NONE;
259 /* get next thread */
260 ret = ps_pread(ta->ph,
261 pt + ta->thread_off_next,
267 ret = ptrace(PT_GETREGS, ta->map[id].lwp, (caddr_t)&gregs, 0);
269 /* no longer exists */
270 ta->map[id].type = PT_NONE;
274 while (pt != 0 && ta->map[id].thr != pt) {
275 ret = ps_pread(ta->ph,
276 pt + ta->thread_off_tcb,
277 &tcb_addr, sizeof(tcb_addr));
280 /* get next thread */
281 ret = ps_pread(ta->ph,
282 pt + ta->thread_off_next,
289 /* no longer exists */
290 ta->map[id].type = PT_NONE;
300 pt_ta_map_lwp2thr(const td_thragent_t *ta, lwpid_t lwp, td_thrhandle_t *th)
302 TAILQ_HEAD(, pthread) thread_list;
309 ret = ps_pread(ta->ph, ta->thread_list_addr, &thread_list,
310 sizeof(thread_list));
313 pt = (psaddr_t)thread_list.tqh_first;
315 ret = ps_pread(ta->ph, pt + ta->thread_off_tcb,
319 ptr += ta->thread_off_tmbx +
320 offsetof(struct kse_thr_mailbox, tm_lwp);
321 ret = ps_pread(ta->ph, ptr, &tmp_lwp, sizeof(lwpid_t));
324 if (tmp_lwp == lwp) {
326 th->th_tid = pt_map_thread(ta, pt, PT_USER);
327 if (th->th_tid == -1)
329 pt_unmap_lwp(ta, lwp);
333 /* get next thread */
334 ret = ps_pread(ta->ph,
335 pt + ta->thread_off_next,
345 pt_ta_thr_iter(const td_thragent_t *ta,
346 td_thr_iter_f *callback, void *cbdata_p,
347 td_thr_state_e state, int ti_pri,
348 sigset_t *ti_sigmask_p,
349 unsigned int ti_user_flags)
351 TAILQ_HEAD(, pthread) thread_list;
359 pserr = ps_pread(ta->ph, ta->thread_activated_addr, &activated,
366 pserr = ps_pread(ta->ph, ta->thread_list_addr, &thread_list,
367 sizeof(thread_list));
370 pt = (psaddr_t)thread_list.tqh_first;
373 th.th_tid = pt_map_thread(ta, pt, PT_USER);
374 /* should we unmap lwp here ? */
377 if ((*callback)(&th, cbdata_p))
379 /* get next thread */
380 pserr = ps_pread(ta->ph,
381 pt + ta->thread_off_next, &pt,
390 pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg)
394 int i, ret, allocated;
398 keytable = malloc(ta->thread_max_keys * ta->thread_size_key);
399 if (keytable == NULL)
401 ret = ps_pread(ta->ph, (psaddr_t)ta->thread_keytable_addr, keytable,
402 ta->thread_max_keys * ta->thread_size_key);
407 for (i = 0; i < ta->thread_max_keys; i++) {
408 allocated = *(int *)(keytable + i * ta->thread_size_key +
409 ta->thread_off_key_allocated);
410 destructor = *(void **)(keytable + i * ta->thread_size_key +
411 ta->thread_off_key_destructor);
413 ret = (ki)(i, destructor, arg);
425 pt_ta_event_addr(const td_thragent_t *ta, td_event_e event, td_notify_t *ptr)
432 pt_ta_set_event(const td_thragent_t *ta, td_thr_events_t *events)
439 pt_ta_clear_event(const td_thragent_t *ta, td_thr_events_t *events)
446 pt_ta_event_getmsg(const td_thragent_t *ta, td_event_msg_t *msg)
453 pt_dbsuspend(const td_thrhandle_t *th, int suspend)
455 td_thragent_t *ta = (td_thragent_t *)th->th_ta;
456 psaddr_t tcb_addr, tmbx_addr, ptr;
459 int attrflags, locklevel, ret;
463 ret = pt_validate(th);
467 if (ta->map[th->th_tid].type == PT_LWP) {
469 ret = ps_lstop(ta->ph, ta->map[th->th_tid].lwp);
471 ret = ps_lcontinue(ta->ph, ta->map[th->th_tid].lwp);
475 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
476 ta->thread_off_attr_flags,
477 &attrflags, sizeof(attrflags));
480 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
482 &tcb_addr, sizeof(tcb_addr));
485 tmbx_addr = tcb_addr + ta->thread_off_tmbx;
486 ptr = tmbx_addr + offsetof(struct kse_thr_mailbox, tm_lwp);
487 ret = ps_pread(ta->ph, ptr, &lwp, sizeof(lwpid_t));
492 /* don't suspend signal thread */
493 if (attrflags & 0x200)
495 if (attrflags & PTHREAD_SCOPE_SYSTEM) {
497 * don't suspend system scope thread if it is holding
498 * some low level locks
500 ptr = ta->map[th->th_tid].thr + ta->thread_off_kse;
501 ret = ps_pread(ta->ph, ptr, &ptr, sizeof(ptr));
504 ret = ps_pread(ta->ph, ptr + ta->thread_off_kse_locklevel,
505 &locklevel, sizeof(int));
508 if (locklevel <= 0) {
509 ptr = ta->map[th->th_tid].thr +
510 ta->thread_off_thr_locklevel;
511 ret = ps_pread(ta->ph, ptr, &locklevel,
518 ret = ps_lstop(ta->ph, lwp);
520 ret = ps_lcontinue(ta->ph, lwp);
526 struct ptrace_lwpinfo pl;
528 if (ptrace(PT_LWPINFO, lwp, (caddr_t) &pl, sizeof(pl)))
531 if (!(pl.pl_flags & PL_FLAG_BOUND))
532 ret = ps_lstop(ta->ph, lwp);
534 ret = ps_lcontinue(ta->ph, lwp);
542 ret = ps_pread(ta->ph,
543 tmbx_addr + offsetof(struct kse_thr_mailbox, tm_dflags),
544 &dflags, sizeof(dflags));
548 dflags |= TMDF_SUSPEND;
550 dflags &= ~TMDF_SUSPEND;
551 ret = ps_pwrite(ta->ph,
552 tmbx_addr + offsetof(struct kse_thr_mailbox, tm_dflags),
553 &dflags, sizeof(dflags));
558 pt_thr_dbresume(const td_thrhandle_t *th)
562 return pt_dbsuspend(th, 0);
566 pt_thr_dbsuspend(const td_thrhandle_t *th)
570 return pt_dbsuspend(th, 1);
574 pt_thr_validate(const td_thrhandle_t *th)
581 ret = pt_ta_map_id2thr(th->th_ta, th->th_tid,
587 pt_thr_get_info(const td_thrhandle_t *th, td_thrinfo_t *info)
589 const td_thragent_t *ta = th->th_ta;
597 ret = pt_validate(th);
601 memset(info, 0, sizeof(*info));
602 if (ta->map[th->th_tid].type == PT_LWP) {
603 info->ti_type = TD_THR_SYSTEM;
604 info->ti_lid = ta->map[th->th_tid].lwp;
605 info->ti_tid = th->th_tid;
606 info->ti_state = TD_THR_RUN;
607 info->ti_type = TD_THR_SYSTEM;
610 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_tcb,
611 &tcb_addr, sizeof(tcb_addr));
614 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_state,
615 &state, sizeof(state));
616 ret = ps_pread(ta->ph,
617 tcb_addr + ta->thread_off_tmbx +
618 offsetof(struct kse_thr_mailbox, tm_lwp),
619 &info->ti_lid, sizeof(lwpid_t));
622 ret = ps_pread(ta->ph,
623 tcb_addr + ta->thread_off_tmbx +
624 offsetof(struct kse_thr_mailbox, tm_dflags),
625 &dflags, sizeof(dflags));
628 info->ti_ta_p = th->th_ta;
629 info->ti_tid = th->th_tid;
630 if (state == ta->thread_state_running)
631 info->ti_state = TD_THR_RUN;
632 else if (state == ta->thread_state_zoombie)
633 info->ti_state = TD_THR_ZOMBIE;
635 info->ti_state = TD_THR_SLEEP;
636 info->ti_db_suspended = ((dflags & TMDF_SUSPEND) != 0);
637 info->ti_type = TD_THR_USER;
642 pt_thr_getfpregs(const td_thrhandle_t *th, prfpregset_t *fpregs)
644 const td_thragent_t *ta = th->th_ta;
645 struct kse_thr_mailbox tmbx;
646 psaddr_t tcb_addr, tmbx_addr, ptr;
652 ret = pt_validate(th);
656 if (ta->map[th->th_tid].type == PT_LWP) {
657 ret = ps_lgetfpregs(ta->ph, ta->map[th->th_tid].lwp, fpregs);
661 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_tcb,
662 &tcb_addr, sizeof(tcb_addr));
665 tmbx_addr = tcb_addr + ta->thread_off_tmbx;
666 ptr = tmbx_addr + offsetof(struct kse_thr_mailbox, tm_lwp);
667 ret = ps_pread(ta->ph, ptr, &lwp, sizeof(lwpid_t));
671 ret = ps_lgetfpregs(ta->ph, lwp, fpregs);
675 ret = ps_pread(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
678 pt_ucontext_to_fpreg(&tmbx.tm_context, fpregs);
683 pt_thr_getgregs(const td_thrhandle_t *th, prgregset_t gregs)
685 const td_thragent_t *ta = th->th_ta;
686 struct kse_thr_mailbox tmbx;
687 psaddr_t tcb_addr, tmbx_addr, ptr;
693 ret = pt_validate(th);
697 if (ta->map[th->th_tid].type == PT_LWP) {
698 ret = ps_lgetregs(ta->ph,
699 ta->map[th->th_tid].lwp, gregs);
703 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_tcb,
704 &tcb_addr, sizeof(tcb_addr));
707 tmbx_addr = tcb_addr + ta->thread_off_tmbx;
708 ptr = tmbx_addr + offsetof(struct kse_thr_mailbox, tm_lwp);
709 ret = ps_pread(ta->ph, ptr, &lwp, sizeof(lwpid_t));
713 ret = ps_lgetregs(ta->ph, lwp, gregs);
716 ret = ps_pread(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
719 pt_ucontext_to_reg(&tmbx.tm_context, gregs);
724 pt_thr_setfpregs(const td_thrhandle_t *th, const prfpregset_t *fpregs)
726 const td_thragent_t *ta = th->th_ta;
727 struct kse_thr_mailbox tmbx;
728 psaddr_t tcb_addr, tmbx_addr, ptr;
734 ret = pt_validate(th);
738 if (ta->map[th->th_tid].type == PT_LWP) {
739 ret = ps_lsetfpregs(ta->ph, ta->map[th->th_tid].lwp, fpregs);
743 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
745 &tcb_addr, sizeof(tcb_addr));
748 tmbx_addr = tcb_addr + ta->thread_off_tmbx;
749 ptr = tmbx_addr + offsetof(struct kse_thr_mailbox, tm_lwp);
750 ret = ps_pread(ta->ph, ptr, &lwp, sizeof(lwpid_t));
754 ret = ps_lsetfpregs(ta->ph, lwp, fpregs);
758 * Read a copy of context, this makes sure that registers
759 * not covered by structure reg won't be clobbered
761 ret = ps_pread(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
765 pt_fpreg_to_ucontext(fpregs, &tmbx.tm_context);
766 ret = ps_pwrite(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
771 pt_thr_setgregs(const td_thrhandle_t *th, const prgregset_t gregs)
773 const td_thragent_t *ta = th->th_ta;
774 struct kse_thr_mailbox tmbx;
775 psaddr_t tcb_addr, tmbx_addr, ptr;
781 ret = pt_validate(th);
785 if (ta->map[th->th_tid].type == PT_LWP) {
786 ret = ps_lsetregs(ta->ph, ta->map[th->th_tid].lwp, gregs);
790 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
792 &tcb_addr, sizeof(tcb_addr));
795 tmbx_addr = tcb_addr + ta->thread_off_tmbx;
796 ptr = tmbx_addr + offsetof(struct kse_thr_mailbox, tm_lwp);
797 ret = ps_pread(ta->ph, ptr, &lwp, sizeof(lwpid_t));
801 ret = ps_lsetregs(ta->ph, lwp, gregs);
806 * Read a copy of context, make sure that registers
807 * not covered by structure reg won't be clobbered
809 ret = ps_pread(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
812 pt_reg_to_ucontext(gregs, &tmbx.tm_context);
813 ret = ps_pwrite(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
818 pt_thr_event_enable(const td_thrhandle_t *th, int en)
825 pt_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *setp)
832 pt_thr_clear_event(const td_thrhandle_t *th, td_thr_events_t *setp)
839 pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg)
846 pt_thr_sstep(const td_thrhandle_t *th, int step)
848 const td_thragent_t *ta = th->th_ta;
849 struct kse_thr_mailbox tmbx;
851 psaddr_t tcb_addr, tmbx_addr;
858 ret = pt_validate(th);
862 if (ta->map[th->th_tid].type == PT_LWP)
865 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
867 &tcb_addr, sizeof(tcb_addr));
871 /* Clear or set single step flag in thread mailbox */
872 ret = ps_pread(ta->ph,
873 tcb_addr + ta->thread_off_tmbx +
874 offsetof(struct kse_thr_mailbox, tm_dflags),
875 &dflags, sizeof(uint32_t));
879 dflags |= TMDF_SSTEP;
881 dflags &= ~TMDF_SSTEP;
882 ret = ps_pwrite(ta->ph,
883 tcb_addr + ta->thread_off_tmbx +
884 offsetof(struct kse_thr_mailbox, tm_dflags),
885 &dflags, sizeof(uint32_t));
889 ret = ps_pread(ta->ph,
890 tcb_addr + ta->thread_off_tmbx +
891 offsetof(struct kse_thr_mailbox, tm_lwp),
892 &lwp, sizeof(lwpid_t));
898 tmbx_addr = tcb_addr + ta->thread_off_tmbx;
900 * context is in userland, some architectures store
901 * single step status in registers, we should change
904 ret = ps_pread(ta->ph, tmbx_addr, &tmbx, sizeof(tmbx));
906 pt_ucontext_to_reg(&tmbx.tm_context, ®s);
907 /* only write out if it is really changed. */
908 if (pt_reg_sstep(®s, step) != 0) {
909 pt_reg_to_ucontext(®s, &tmbx.tm_context);
910 ret = ps_pwrite(ta->ph, tmbx_addr, &tmbx,
918 pt_unmap_lwp(const td_thragent_t *ta, lwpid_t lwp)
922 for (i = 0; i < ta->map_len; ++i) {
923 if (ta->map[i].type == PT_LWP && ta->map[i].lwp == lwp) {
924 ta->map[i].type = PT_NONE;
931 pt_validate(const td_thrhandle_t *th)
934 if (th->th_tid < 0 || th->th_tid >= th->th_ta->map_len ||
935 th->th_ta->map[th->th_tid].type == PT_NONE)
941 pt_thr_tls_get_addr(const td_thrhandle_t *th, void *_linkmap, size_t offset,
945 const td_thragent_t *ta = th->th_ta;
946 psaddr_t tcb_addr, *dtv_addr, tcb_tp;
949 /* linkmap is a member of Obj_Entry */
950 obj_entry = (char *)_linkmap - ta->thread_off_linkmap;
952 /* get tlsindex of the object file */
953 ret = ps_pread(ta->ph,
954 obj_entry + ta->thread_off_tlsindex,
955 &tls_index, sizeof(tls_index));
960 ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
962 &tcb_addr, sizeof(tcb_addr));
966 /* get dtv array address */
967 ret = ps_pread(ta->ph, tcb_addr + ta->thread_off_dtv,
968 &dtv_addr, sizeof(dtv_addr));
971 /* now get the object's tls block base address */
972 ret = ps_pread(ta->ph, &dtv_addr[tls_index+1], address,
981 struct ta_ops libpthread_db_ops = {
983 .to_ta_clear_event = pt_ta_clear_event,
984 .to_ta_delete = pt_ta_delete,
985 .to_ta_event_addr = pt_ta_event_addr,
986 .to_ta_event_getmsg = pt_ta_event_getmsg,
987 .to_ta_map_id2thr = pt_ta_map_id2thr,
988 .to_ta_map_lwp2thr = pt_ta_map_lwp2thr,
989 .to_ta_new = pt_ta_new,
990 .to_ta_set_event = pt_ta_set_event,
991 .to_ta_thr_iter = pt_ta_thr_iter,
992 .to_ta_tsd_iter = pt_ta_tsd_iter,
993 .to_thr_clear_event = pt_thr_clear_event,
994 .to_thr_dbresume = pt_thr_dbresume,
995 .to_thr_dbsuspend = pt_thr_dbsuspend,
996 .to_thr_event_enable = pt_thr_event_enable,
997 .to_thr_event_getmsg = pt_thr_event_getmsg,
998 .to_thr_get_info = pt_thr_get_info,
999 .to_thr_getfpregs = pt_thr_getfpregs,
1000 .to_thr_getgregs = pt_thr_getgregs,
1001 .to_thr_set_event = pt_thr_set_event,
1002 .to_thr_setfpregs = pt_thr_setfpregs,
1003 .to_thr_setgregs = pt_thr_setgregs,
1004 .to_thr_validate = pt_thr_validate,
1005 .to_thr_tls_get_addr = pt_thr_tls_get_addr,
1007 /* FreeBSD specific extensions. */
1008 .to_thr_sstep = pt_thr_sstep,