1 /* Private header for thread debug library. */
3 #define _THREAD_DBP_H 1
8 #include "proc_service.h"
10 #include "../nptl/pthreadP.h"
14 /* Indeces for the symbol names. */
17 SYM_PTHREAD_THREADS_EVENTS
= 0,
18 SYM_PTHREAD_LAST_EVENT
,
20 SYM_PTHREAD_STACK_USED
,
21 SYM_PTHREAD_STACK_USER
,
24 SYM_PTHREAD_SIZEOF_DESCR
,
25 SYM_PTHREAD_CREATE_EVENT
,
26 SYM_PTHREAD_DEATH_EVENT
,
32 /* Comment out the following for less verbose output. */
34 # define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n"))
35 extern int __td_debug
;
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 /* Lists of running threads. */
54 /* Address of the `pthread_keys' array. */
55 struct pthread_key_struct
*keys
;
57 /* Maximum number of thread-local data keys. */
60 /* Size of 2nd level array for thread-local data keys. */
61 int pthread_key_2ndlevel_size
;
63 /* Sizeof struct _pthread_descr_struct. */
66 /* Pointer to the `__pthread_threads_events' variable in the target. */
67 psaddr_t pthread_threads_eventsp
;
69 /* Pointer to the `__pthread_last_event' variable in the target. */
70 psaddr_t pthread_last_event
;
72 /* List head the queue agent structures. */
77 /* List of all known descriptors. */
78 extern list_t __td_agent_list
;
81 /* Function used to test for correct thread agent pointer. */
83 ta_ok (const td_thragent_t
*ta
)
87 list_for_each (runp
, &__td_agent_list
)
88 if (list_entry (runp
, td_thragent_t
, list
) == ta
)
95 /* Internal wrapper around ps_pglobal_lookup. */
96 extern int td_lookup (struct ps_prochandle
*ps
, int idx
, psaddr_t
*sym_addr
);
98 #endif /* thread_dbP.h */