mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-29 19:34:05 +08:00
f8aeae3473
for ChangeLog [BZ #17090] [BZ #17620] [BZ #17621] [BZ #17628] * NEWS: Update. * elf/dl-tls.c (_dl_update_slotinfo): Clean up outdated DTV entries with Static TLS too. Skip entries past the end of the allocated DTV, from Alan Modra. (tls_get_addr_tail): Update to glibc_likely/unlikely. Move Static TLS DTV entry set up from... (_dl_allocate_tls_init): ... here (fix modid assertion), ... * elf/dl-reloc.c (_dl_nothread_init_static_tls): ... here... * nptl/allocatestack.c (init_one_static_tls): ... and here... * elf/dlopen.c (dl_open_worker): Drop l_tls_modid upper bound for Static TLS. * elf/tlsdeschtab.h (map_generation): Return size_t. Check that the slot we find is associated with the given map before using its generation count. * nptl_db/db_info.c: Include ldsodefs.h. (rtld_global, dtv_slotinfo_list, dtv_slotinfo): New typedefs. * nptl_db/structs.def (DB_RTLD_VARIABLE): New macro. (DB_MAIN_VARIABLE, DB_RTLD_GLOBAL_FIELD): Likewise. (link_map::l_tls_offset): New struct field. (dtv_t::counter): Likewise. (rtld_global): New struct. (_rtld_global): New rtld variable. (dl_tls_dtv_slotinfo_list): New rtld global field. (dtv_slotinfo_list): New struct. (dtv_slotinfo): Likewise. * nptl_db/td_symbol_list.c: Drop gnu/lib-names.h include. (td_lookup): Rename to... (td_mod_lookup): ... this. Use new mod parameter instead of LIBPTHREAD_SO. * nptl_db/td_thr_tlsbase.c: Include link.h. (dtv_slotinfo_list, dtv_slotinfo): New functions. (td_thr_tlsbase): Check DTV generation. Compute Static TLS addresses even if the DTV is out of date or missing them. * nptl_db/fetch-value.c (_td_locate_field): Do not refuse to index zero-length arrays. * nptl_db/thread_dbP.h: Include gnu/lib-names.h. (td_lookup): Make it a macro implemented in terms of... (td_mod_lookup): ... this declaration. * nptl_db/db-symbols.awk (DB_RTLD_VARIABLE): Override. (DB_MAIN_VARIABLE): Likewise.
125 lines
3.9 KiB
Modula-2
125 lines
3.9 KiB
Modula-2
/* List of types and symbols in libpthread examined by libthread_db.
|
|
Copyright (C) 2003-2015 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
|
|
<http://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
|
|
|
|
#ifndef DB_MAIN_VARIABLE
|
|
# define DB_MAIN_VARIABLE(name) DB_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, pid)
|
|
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 (stack_used)
|
|
DB_SYMBOL (__stack_user)
|
|
DB_SYMBOL (nptl_version)
|
|
DB_FUNCTION (__nptl_create_event)
|
|
DB_FUNCTION (__nptl_death_event)
|
|
DB_SYMBOL (__nptl_threads_events)
|
|
DB_VARIABLE (__nptl_nthreads)
|
|
DB_VARIABLE (__nptl_last_event)
|
|
DB_VARIABLE (__nptl_initial_report_events)
|
|
|
|
DB_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_STRUCT (rtld_global)
|
|
DB_RTLD_VARIABLE (_rtld_global)
|
|
#endif
|
|
DB_RTLD_GLOBAL_FIELD (dl_tls_dtv_slotinfo_list)
|
|
|
|
DB_STRUCT (dtv_slotinfo_list)
|
|
DB_STRUCT_FIELD (dtv_slotinfo_list, len)
|
|
DB_STRUCT_FIELD (dtv_slotinfo_list, next)
|
|
DB_STRUCT_ARRAY_FIELD (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
|