1 /* Private header for thread debug library. */
3 #define _THREAD_DBP_H 1
9 #include "proc_service.h"
10 #include "thread_db.h"
11 #include "internals.h"
14 /* Indices for the symbol names. */
17 PTHREAD_THREADS_EVENTS = 0,
22 LINUXTHREADS_PTHREAD_THREADS_MAX,
23 LINUXTHREADS_PTHREAD_KEYS_MAX,
24 LINUXTHREADS_PTHREAD_SIZEOF_DESCR,
25 LINUXTHREADS_CREATE_EVENT,
26 LINUXTHREADS_DEATH_EVENT,
27 LINUXTHREADS_REAP_EVENT,
28 LINUXTHREADS_INITIAL_REPORT_EVENTS,
34 /* Comment out the following for less verbose output. */
36 # define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n"))
37 extern int __td_debug attribute_hidden;
43 /* Handle for a process. This type is opaque. */
46 /* Delivered by the debugger and we have to pass it back in the
48 struct ps_prochandle *ph;
50 /* Some cached information. */
52 /* Address of the `__pthread_handles' array. */
53 struct pthread_handle_struct *handles;
55 /* Address of the `pthread_kyes' array. */
56 struct pthread_key_struct *keys;
58 /* Maximum number of threads. */
59 int pthread_threads_max;
61 /* Maximum number of thread-local data keys. */
64 /* Size of 2nd level array for thread-local data keys. */
65 int pthread_key_2ndlevel_size;
67 /* Sizeof struct _pthread_descr_struct. */
70 /* Pointer to the `__pthread_threads_events' variable in the target. */
71 psaddr_t pthread_threads_eventsp;
73 /* Pointer to the `__pthread_last_event' variable in the target. */
74 psaddr_t pthread_last_event;
76 /* Pointer to the `__pthread_handles_num' variable. */
77 psaddr_t pthread_handles_num;
81 /* Type used internally to keep track of thread agent descriptors. */
85 struct agent_list *next;
88 /* List of all known descriptors. */
89 extern struct agent_list *__td_agent_list attribute_hidden;
91 /* Function used to test for correct thread agent pointer. */
93 ta_ok (const td_thragent_t *ta)
95 struct agent_list *runp = __td_agent_list;
100 while (runp != NULL && runp->ta != ta)
107 /* Internal wrapper around ps_pglobal_lookup. */
108 extern int td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr) attribute_hidden;
110 #endif /* thread_dbP.h */