GDB (xrefs)

gdb_thread_db.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2018 Free Software Foundation, Inc.
2
3 This file is part of GDB.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18 #ifndef GDB_THREAD_DB_H
19 #define GDB_THREAD_DB_H 1
20
21 #ifdef HAVE_THREAD_DB_H
22 #include <thread_db.h>
23 #else
24 #include "glibc_thread_db.h"
25 #endif
26
27 #ifndef LIBTHREAD_DB_SO
28 #define LIBTHREAD_DB_SO "libthread_db.so.1"
29 #endif
30
31 #ifndef LIBTHREAD_DB_SEARCH_PATH
32 /* $sdir appears before $pdir for some minimal security protection:
33 we trust the system libthread_db.so a bit more than some random
34 libthread_db associated with whatever libpthread the app is using. */
35 #define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
36 #endif
37
38 /* Types of the libthread_db functions. */
39
40 typedef td_err_e (td_init_ftype) (void);
41
42 typedef td_err_e (td_ta_new_ftype) (struct ps_prochandle * ps,
43 td_thragent_t **ta);
44 typedef td_err_e (td_ta_map_lwp2thr_ftype) (const td_thragent_t *ta,
45 lwpid_t lwpid, td_thrhandle_t *th);
46 typedef td_err_e (td_ta_thr_iter_ftype) (const td_thragent_t *ta,
47 td_thr_iter_f *callback, void *cbdata_p,
48 td_thr_state_e state, int ti_pri,
49 sigset_t *ti_sigmask_p,
50 unsigned int ti_user_flags);
51 typedef td_err_e (td_ta_event_addr_ftype) (const td_thragent_t *ta,
52 td_event_e event, td_notify_t *ptr);
53 typedef td_err_e (td_ta_set_event_ftype) (const td_thragent_t *ta,
54 td_thr_events_t *event);
55 typedef td_err_e (td_ta_clear_event_ftype) (const td_thragent_t *ta,
56 td_thr_events_t *event);
57 typedef td_err_e (td_ta_event_getmsg_ftype) (const td_thragent_t *ta,
58 td_event_msg_t *msg);
59
60 typedef td_err_e (td_thr_get_info_ftype) (const td_thrhandle_t *th,
61 td_thrinfo_t *infop);
62 typedef td_err_e (td_thr_event_enable_ftype) (const td_thrhandle_t *th,
63 int event);
64
65 typedef td_err_e (td_thr_tls_get_addr_ftype) (const td_thrhandle_t *th,
66 psaddr_t map_address,
67 size_t offset, psaddr_t *address);
68 typedef td_err_e (td_thr_tlsbase_ftype) (const td_thrhandle_t *th,
69 unsigned long int modid,
70 psaddr_t *base);
71
72 typedef const char ** (td_symbol_list_ftype) (void);
73 typedef td_err_e (td_ta_delete_ftype) (td_thragent_t *);
74
75 #endif /* GDB_THREAD_DB_H */
lwpid_t
unsigned int lwpid_t
Definition: gdb_proc_service.h:80
td_ta_set_event_ftype
td_err_e() td_ta_set_event_ftype(const td_thragent_t *ta, td_thr_events_t *event)
Definition: gdb_thread_db.h:53
ps_prochandle
Definition: gdb_proc_service.h:179
cleanup_check.ps
ps
Definition: cleanup_check.py:333
td_symbol_list_ftype
const char **() td_symbol_list_ftype(void)
Definition: gdb_thread_db.h:72
td_thr_events
Definition: glibc_thread_db.h:115
td_thr_get_info_ftype
td_err_e() td_thr_get_info_ftype(const td_thrhandle_t *th, td_thrinfo_t *infop)
Definition: gdb_thread_db.h:60
td_thrinfo
Definition: glibc_thread_db.h:259
td_thr_iter_f
int td_thr_iter_f(const td_thrhandle_t *, void *)
Definition: glibc_thread_db.h:247
td_thrhandle
Definition: glibc_thread_db.h:92
td_thragent_t
struct td_thragent td_thragent_t
Definition: glibc_thread_db.h:89
td_ta_delete_ftype
td_err_e() td_ta_delete_ftype(td_thragent_t *)
Definition: gdb_thread_db.h:73
td_event_msg
Definition: glibc_thread_db.h:198
td_ta_map_lwp2thr_ftype
td_err_e() td_ta_map_lwp2thr_ftype(const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
Definition: gdb_thread_db.h:44
td_thr_state_e
td_thr_state_e
Definition: glibc_thread_db.h:64
psaddr_t
void * psaddr_t
Definition: gdb_proc_service.h:84
td_ta_event_getmsg_ftype
td_err_e() td_ta_event_getmsg_ftype(const td_thragent_t *ta, td_event_msg_t *msg)
Definition: gdb_thread_db.h:57
td_ta_new_ftype
td_err_e() td_ta_new_ftype(struct ps_prochandle *ps, td_thragent_t **ta)
Definition: gdb_thread_db.h:42
td_ta_clear_event_ftype
td_err_e() td_ta_clear_event_ftype(const td_thragent_t *ta, td_thr_events_t *event)
Definition: gdb_thread_db.h:55
td_event_e
td_event_e
Definition: glibc_thread_db.h:154
td_ta_event_addr_ftype
td_err_e() td_ta_event_addr_ftype(const td_thragent_t *ta, td_event_e event, td_notify_t *ptr)
Definition: gdb_thread_db.h:51
glibc_thread_db.h
offset
int offset
Definition: agent.c:65
td_notify
Definition: glibc_thread_db.h:187
td_thr_tls_get_addr_ftype
td_err_e() td_thr_tls_get_addr_ftype(const td_thrhandle_t *th, psaddr_t map_address, size_t offset, psaddr_t *address)
Definition: gdb_thread_db.h:65
td_thr_event_enable_ftype
td_err_e() td_thr_event_enable_ftype(const td_thrhandle_t *th, int event)
Definition: gdb_thread_db.h:62
td_init_ftype
td_err_e() td_init_ftype(void)
Definition: gdb_thread_db.h:40
td_thr_tlsbase_ftype
td_err_e() td_thr_tlsbase_ftype(const td_thrhandle_t *th, unsigned long int modid, psaddr_t *base)
Definition: gdb_thread_db.h:68
td_ta_thr_iter_ftype
td_err_e() td_ta_thr_iter_ftype(const td_thragent_t *ta, td_thr_iter_f *callback, void *cbdata_p, td_thr_state_e state, int ti_pri, sigset_t *ti_sigmask_p, unsigned int ti_user_flags)
Definition: gdb_thread_db.h:46
td_err_e
td_err_e
Definition: glibc_thread_db.h:32