1 /* Private header for thread debug library. */
3 #define _THREAD_DBP_H 1
6 #include "proc_service.h"
8 #include "../linuxthreads/internals.h"
11 /* Comment out the following for less verbose output. */
13 # define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n"))
14 extern int __td_debug
;
20 /* Handle for a process. This type is opaque. */
23 /* Delivered by the debugger and we have to pass it back in the
25 struct ps_prochandle
*ph
;
27 /* Some cached information. */
29 /* Address of the `__pthread_handles' array. */
30 struct pthread_handle_struct
*handles
;
32 /* Address of the `pthread_kyes' array. */
33 struct pthread_key_struct
*keys
;
35 /* Maximum number of threads. */
36 int pthread_threads_max
;
38 /* Maximum number of thread-local data keys. */
41 /* Size of 2nd level array for thread-local data keys. */
42 int pthread_key_2ndlevel_size
;
44 /* Sizeof struct _pthread_descr_struct. */
47 /* Pointer to the `__pthread_threads_events' variable in the target. */
48 psaddr_t pthread_threads_eventsp
;
50 /* Pointer to the `__pthread_last_event' variable in the target. */
51 psaddr_t pthread_last_event
;
53 /* Pointer to the `__pthread_handles_num' variable. */
54 psaddr_t pthread_handles_num
;
58 /* Type used internally to keep track of thread agent descriptors. */
62 struct agent_list
*next
;
65 /* List of all known descriptors. */
66 extern struct agent_list
*__td_agent_list
;
68 /* Function used to test for correct thread agent pointer. */
70 ta_ok (const td_thragent_t
*ta
)
72 struct agent_list
*runp
= __td_agent_list
;
77 while (runp
!= NULL
&& runp
->ta
!= ta
)
83 #endif /* thread_dbP.h */