1 #ifdef HAVE_THREAD_DB_H
4 #include "glibc_thread_db.h"
7 #ifndef LIBTHREAD_DB_SO
8 #define LIBTHREAD_DB_SO "libthread_db.so.1"
11 #ifndef LIBTHREAD_DB_SEARCH_PATH
12 /* $sdir appears before $pdir for some minimal security protection:
13 we trust the system libthread_db.so a bit more than some random
14 libthread_db associated with whatever libpthread the app is using. */
15 #define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
18 /* Types of the libthread_db functions. */
20 typedef td_err_e (td_init_ftype
) (void);
22 typedef td_err_e (td_ta_new_ftype
) (struct ps_prochandle
* ps
,
24 typedef td_err_e (td_ta_map_lwp2thr_ftype
) (const td_thragent_t
*ta
,
25 lwpid_t lwpid
, td_thrhandle_t
*th
);
26 typedef td_err_e (td_ta_thr_iter_ftype
) (const td_thragent_t
*ta
,
27 td_thr_iter_f
*callback
, void *cbdata_p
,
28 td_thr_state_e state
, int ti_pri
,
29 sigset_t
*ti_sigmask_p
,
30 unsigned int ti_user_flags
);
31 typedef td_err_e (td_ta_event_addr_ftype
) (const td_thragent_t
*ta
,
32 td_event_e event
, td_notify_t
*ptr
);
33 typedef td_err_e (td_ta_set_event_ftype
) (const td_thragent_t
*ta
,
34 td_thr_events_t
*event
);
35 typedef td_err_e (td_ta_clear_event_ftype
) (const td_thragent_t
*ta
,
36 td_thr_events_t
*event
);
37 typedef td_err_e (td_ta_event_getmsg_ftype
) (const td_thragent_t
*ta
,
40 typedef td_err_e (td_thr_validate_ftype
) (const td_thrhandle_t
*th
);
41 typedef td_err_e (td_thr_get_info_ftype
) (const td_thrhandle_t
*th
,
43 typedef td_err_e (td_thr_event_enable_ftype
) (const td_thrhandle_t
*th
,
46 typedef td_err_e (td_thr_tls_get_addr_ftype
) (const td_thrhandle_t
*th
,
48 size_t offset
, psaddr_t
*address
);
49 typedef td_err_e (td_thr_tlsbase_ftype
) (const td_thrhandle_t
*th
,
50 unsigned long int modid
,
53 typedef const char ** (td_symbol_list_ftype
) (void);
54 typedef td_err_e (td_ta_delete_ftype
) (td_thragent_t
*);