1/* List of types and symbols in libpthread examined by libthread_db.
2 Copyright (C) 2003-2016 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library 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 GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef DB_STRUCT_ARRAY_FIELD
20# define DB_STRUCT_ARRAY_FIELD(type, field) DB_STRUCT_FIELD (type, field)
21# define DB_ARRAY_VARIABLE(name) DB_VARIABLE (name)
22# define STRUCTS_DEF_DEFAULTS 1
23#endif
24
25#ifndef DB_RTLD_VARIABLE
26# define DB_RTLD_VARIABLE(name) DB_VARIABLE (name)
27#endif
28
29#ifndef DB_MAIN_VARIABLE
30# define DB_MAIN_VARIABLE(name) DB_VARIABLE (name)
31#endif
32
33#ifndef DB_RTLD_GLOBAL_FIELD
34# if !IS_IN (libpthread)
35# define DB_RTLD_GLOBAL_FIELD(field) \
36 DB_STRUCT_FIELD (rtld_global, _##field) \
37 DB_MAIN_VARIABLE (_##field)
38# elif defined SHARED
39# define DB_RTLD_GLOBAL_FIELD(field) \
40 DB_STRUCT_FIELD (rtld_global, _##field)
41# else
42# define DB_RTLD_GLOBAL_FIELD(field) \
43 DB_MAIN_VARIABLE (_##field)
44# endif
45#endif /* DB_RTLD_GLOBAL_FIELD */
46
47DB_STRUCT (pthread)
48DB_STRUCT_FIELD (pthread, list)
49DB_STRUCT_FIELD (pthread, report_events)
50DB_STRUCT_FIELD (pthread, tid)
51DB_STRUCT_FIELD (pthread, pid)
52DB_STRUCT_FIELD (pthread, start_routine)
53DB_STRUCT_FIELD (pthread, cancelhandling)
54DB_STRUCT_FIELD (pthread, schedpolicy)
55DB_STRUCT_FIELD (pthread, schedparam_sched_priority)
56DB_STRUCT_FIELD (pthread, specific)
57DB_STRUCT_FIELD (pthread, eventbuf)
58DB_STRUCT_FIELD (pthread, eventbuf_eventmask)
59DB_STRUCT_ARRAY_FIELD (pthread, eventbuf_eventmask_event_bits)
60DB_STRUCT_FIELD (pthread, nextevent)
61
62DB_STRUCT (list_t)
63DB_STRUCT_FIELD (list_t, next)
64DB_STRUCT_FIELD (list_t, prev)
65
66DB_STRUCT (td_thr_events_t)
67DB_STRUCT_ARRAY_FIELD (td_thr_events_t, event_bits)
68
69DB_STRUCT (td_eventbuf_t)
70DB_STRUCT_FIELD (td_eventbuf_t, eventnum)
71DB_STRUCT_FIELD (td_eventbuf_t, eventdata)
72
73DB_SYMBOL (stack_used)
74DB_SYMBOL (__stack_user)
75DB_SYMBOL (nptl_version)
76DB_FUNCTION (__nptl_create_event)
77DB_FUNCTION (__nptl_death_event)
78DB_SYMBOL (__nptl_threads_events)
79DB_VARIABLE (__nptl_nthreads)
80DB_VARIABLE (__nptl_last_event)
81DB_VARIABLE (__nptl_initial_report_events)
82
83DB_ARRAY_VARIABLE (__pthread_keys)
84DB_STRUCT (pthread_key_struct)
85DB_STRUCT_FIELD (pthread_key_struct, seq)
86DB_STRUCT_FIELD (pthread_key_struct, destr)
87
88DB_STRUCT (pthread_key_data)
89DB_STRUCT_FIELD (pthread_key_data, seq)
90DB_STRUCT_FIELD (pthread_key_data, data)
91DB_STRUCT (pthread_key_data_level2)
92DB_STRUCT_ARRAY_FIELD (pthread_key_data_level2, data)
93
94DB_STRUCT_FIELD (link_map, l_tls_modid)
95DB_STRUCT_FIELD (link_map, l_tls_offset)
96
97DB_STRUCT_ARRAY_FIELD (dtv, dtv)
98#define pointer_val pointer.val /* Field of anonymous struct in dtv_t. */
99DB_STRUCT_FIELD (dtv_t, pointer_val)
100DB_STRUCT_FIELD (dtv_t, counter)
101#if !IS_IN (libpthread) || TLS_TCB_AT_TP
102DB_STRUCT_FIELD (pthread, dtvp)
103#endif
104
105#if !(IS_IN (libpthread) && !defined SHARED)
106DB_STRUCT (rtld_global)
107DB_RTLD_VARIABLE (_rtld_global)
108#endif
109DB_RTLD_GLOBAL_FIELD (dl_tls_dtv_slotinfo_list)
110
111DB_STRUCT (dtv_slotinfo_list)
112DB_STRUCT_FIELD (dtv_slotinfo_list, len)
113DB_STRUCT_FIELD (dtv_slotinfo_list, next)
114DB_STRUCT_ARRAY_FIELD (dtv_slotinfo_list, slotinfo)
115
116DB_STRUCT (dtv_slotinfo)
117DB_STRUCT_FIELD (dtv_slotinfo, gen)
118DB_STRUCT_FIELD (dtv_slotinfo, map)
119
120#ifdef STRUCTS_DEF_DEFAULTS
121# undef DB_STRUCT_ARRAY_FIELD
122# undef DB_ARRAY_VARIABLE
123# undef STRUCTS_DEF_DEFAULTS
124#endif
125