1 /* Private header for thread debug library. */
3 #define _THREAD_DBP_H 1
7 #include "proc_service.h"
12 /* Indices for the symbol names. */
15 PTHREAD_THREADS_EVENTS = 0,
20 LINUXTHREADS_PTHREAD_THREADS_MAX,
21 LINUXTHREADS_PTHREAD_KEYS_MAX,
22 LINUXTHREADS_PTHREAD_SIZEOF_DESCR,
23 LINUXTHREADS_CREATE_EVENT,
24 LINUXTHREADS_DEATH_EVENT,
25 LINUXTHREADS_REAP_EVENT,
26 LINUXTHREADS_INITIAL_REPORT_EVENTS,
32 /* Comment out the following for less verbose output. */
34 # define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n"))
35 extern int __td_debug attribute_hidden;
41 /* Handle for a process. This type is opaque. */
44 /* Delivered by the debugger and we have to pass it back in the
46 struct ps_prochandle *ph;
48 /* Some cached information. */
50 /* Address of the `__pthread_handles' array. */
51 struct pthread_handle_struct *handles;
53 /* Address of the `pthread_kyes' array. */
54 struct pthread_key_struct *keys;
56 /* Maximum number of threads. */
57 int pthread_threads_max;
59 /* Maximum number of thread-local data keys. */
62 /* Size of 2nd level array for thread-local data keys. */
63 int pthread_key_2ndlevel_size;
65 /* Sizeof struct _pthread_descr_struct. */
68 /* Pointer to the `__pthread_threads_events' variable in the target. */
69 psaddr_t pthread_threads_eventsp;
71 /* Pointer to the `__pthread_last_event' variable in the target. */
72 psaddr_t pthread_last_event;
74 /* Pointer to the `__pthread_handles_num' variable. */
75 psaddr_t pthread_handles_num;
79 /* Type used internally to keep track of thread agent descriptors. */
83 struct agent_list *next;
86 /* List of all known descriptors. */
87 extern struct agent_list *__td_agent_list attribute_hidden;
89 /* Function used to test for correct thread agent pointer. */
91 ta_ok (const td_thragent_t *ta)
93 struct agent_list *runp = __td_agent_list;
98 while (runp != NULL && runp->ta != ta)
105 /* Internal wrapper around ps_pglobal_lookup. */
106 extern int td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr) attribute_hidden;
108 #endif /* thread_dbP.h */