about summary refs log tree commit diff
path: root/nptl_db/structs.def
blob: 71c9f7bfc2f75858a35ebe7f523c87143764d6d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/* List of types and symbols in libpthread examined by libthread_db.
   Copyright (C) 2003-2021 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <https://www.gnu.org/licenses/>.  */

#ifndef DB_STRUCT_ARRAY_FIELD
# define DB_STRUCT_ARRAY_FIELD(type, field) DB_STRUCT_FIELD (type, field)
# define DB_ARRAY_VARIABLE(name) DB_VARIABLE (name)
# define STRUCTS_DEF_DEFAULTS 1
#endif

#ifndef DB_RTLD_VARIABLE
# define DB_RTLD_VARIABLE(name) DB_VARIABLE (name)
#endif

/* DB_MAIN_VARIABLE, DB_MAIN_SYMBOL, DB_MAIN_ARRAY_VARIABLE are not
   covered by the libpthread symbol check in db-symbols.awk.  */
#ifndef DB_MAIN_VARIABLE
# define DB_MAIN_VARIABLE(name) DB_VARIABLE (name)
#endif
#ifndef DB_MAIN_SYMBOL
# define DB_MAIN_SYMBOL(name) DB_SYMBOL (name)
#endif
#ifndef DB_MAIN_ARRAY_VARIABLE
# define DB_MAIN_ARRAY_VARIABLE(name) DB_ARRAY_VARIABLE (name)
#endif

#ifndef DB_RTLD_GLOBAL_FIELD
# if !IS_IN (libpthread)
#  define DB_RTLD_GLOBAL_FIELD(field)		\
  DB_STRUCT_FIELD (rtld_global, _##field)	\
  DB_MAIN_VARIABLE (_##field)
# elif defined SHARED
#  define DB_RTLD_GLOBAL_FIELD(field)		\
  DB_STRUCT_FIELD (rtld_global, _##field)
# else
#  define DB_RTLD_GLOBAL_FIELD(field)		\
  DB_MAIN_VARIABLE (_##field)
# endif
#endif /* DB_RTLD_GLOBAL_FIELD */

DB_STRUCT (pthread)
DB_STRUCT_FIELD (pthread, list)
DB_STRUCT_FIELD (pthread, report_events)
DB_STRUCT_FIELD (pthread, tid)
DB_STRUCT_FIELD (pthread, start_routine)
DB_STRUCT_FIELD (pthread, cancelhandling)
DB_STRUCT_FIELD (pthread, schedpolicy)
DB_STRUCT_FIELD (pthread, schedparam_sched_priority)
DB_STRUCT_FIELD (pthread, specific)
DB_STRUCT_FIELD (pthread, eventbuf)
DB_STRUCT_FIELD (pthread, eventbuf_eventmask)
DB_STRUCT_ARRAY_FIELD (pthread, eventbuf_eventmask_event_bits)
DB_STRUCT_FIELD (pthread, nextevent)

DB_STRUCT (list_t)
DB_STRUCT_FIELD (list_t, next)
DB_STRUCT_FIELD (list_t, prev)

DB_STRUCT (td_thr_events_t)
DB_STRUCT_ARRAY_FIELD (td_thr_events_t, event_bits)

DB_STRUCT (td_eventbuf_t)
DB_STRUCT_FIELD (td_eventbuf_t, eventnum)
DB_STRUCT_FIELD (td_eventbuf_t, eventdata)

DB_SYMBOL (nptl_version)
DB_MAIN_SYMBOL (__nptl_create_event)
DB_MAIN_SYMBOL (__nptl_death_event)
DB_SYMBOL (__nptl_threads_events)
DB_MAIN_VARIABLE (__nptl_nthreads)
DB_VARIABLE (__nptl_last_event)
DB_RTLD_VARIABLE (__nptl_initial_report_events)

DB_MAIN_ARRAY_VARIABLE (__pthread_keys)
DB_STRUCT (pthread_key_struct)
DB_STRUCT_FIELD (pthread_key_struct, seq)
DB_STRUCT_FIELD (pthread_key_struct, destr)

DB_STRUCT (pthread_key_data)
DB_STRUCT_FIELD (pthread_key_data, seq)
DB_STRUCT_FIELD (pthread_key_data, data)
DB_STRUCT (pthread_key_data_level2)
DB_STRUCT_ARRAY_FIELD (pthread_key_data_level2, data)

DB_STRUCT_FIELD (link_map, l_tls_modid)
DB_STRUCT_FIELD (link_map, l_tls_offset)

DB_STRUCT_ARRAY_FIELD (dtv, dtv)
#define pointer_val pointer.val /* Field of anonymous struct in dtv_t.  */
DB_STRUCT_FIELD (dtv_t, pointer_val)
DB_STRUCT_FIELD (dtv_t, counter)
#if !IS_IN (libpthread) || TLS_TCB_AT_TP
DB_STRUCT_FIELD (pthread, dtvp)
#endif

#if !(IS_IN (libpthread) && !defined SHARED)
DB_VARIABLE (__nptl_rtld_global)
#endif
DB_RTLD_GLOBAL_FIELD (dl_tls_dtv_slotinfo_list)
DB_RTLD_GLOBAL_FIELD (dl_stack_user)
DB_RTLD_GLOBAL_FIELD (dl_stack_used)

DB_STRUCT (dtv_slotinfo_list)
DB_STRUCT_FIELD (dtv_slotinfo_list, len)
DB_STRUCT_FIELD (dtv_slotinfo_list, next)
DB_STRUCT_FLEXIBLE_ARRAY (dtv_slotinfo_list, slotinfo)

DB_STRUCT (dtv_slotinfo)
DB_STRUCT_FIELD (dtv_slotinfo, gen)
DB_STRUCT_FIELD (dtv_slotinfo, map)

#ifdef STRUCTS_DEF_DEFAULTS
# undef DB_STRUCT_ARRAY_FIELD
# undef DB_ARRAY_VARIABLE
# undef STRUCTS_DEF_DEFAULTS
#endif