123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- #ifndef _THREAD_DBP_H
- #define _THREAD_DBP_H 1
- #define __FORCE_GLIBC
- #include <features.h>
- #include <string.h>
- #include <unistd.h>
- #include "proc_service.h"
- #include "thread_db.h"
- #include "internals.h"
- enum
- {
- PTHREAD_THREADS_EVENTS = 0,
- PTHREAD_LAST_EVENT,
- PTHREAD_HANDLES_NUM,
- PTHREAD_HANDLES,
- PTHREAD_KEYS,
- LINUXTHREADS_PTHREAD_THREADS_MAX,
- LINUXTHREADS_PTHREAD_KEYS_MAX,
- LINUXTHREADS_PTHREAD_SIZEOF_DESCR,
- LINUXTHREADS_CREATE_EVENT,
- LINUXTHREADS_DEATH_EVENT,
- LINUXTHREADS_REAP_EVENT,
- LINUXTHREADS_INITIAL_REPORT_EVENTS,
- LINUXTHREADS_VERSION,
- NUM_MESSAGES
- };
- #ifndef NDEBUG
- # define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n"))
- extern int __td_debug attribute_hidden;
- #else
- # define LOG(c)
- #endif
- struct td_thragent
- {
-
- struct ps_prochandle *ph;
-
-
- struct pthread_handle_struct *handles;
-
- struct pthread_key_struct *keys;
-
- int pthread_threads_max;
-
- int pthread_keys_max;
-
- int pthread_key_2ndlevel_size;
-
- int sizeof_descr;
-
- psaddr_t pthread_threads_eventsp;
-
- psaddr_t pthread_last_event;
-
- psaddr_t pthread_handles_num;
- };
- struct agent_list
- {
- td_thragent_t *ta;
- struct agent_list *next;
- };
- extern struct agent_list *__td_agent_list attribute_hidden;
- static __inline__ int
- ta_ok (const td_thragent_t *ta)
- {
- struct agent_list *runp = __td_agent_list;
- if (ta == NULL)
- return 0;
- while (runp != NULL && runp->ta != ta)
- runp = runp->next;
- return runp != NULL;
- }
- extern int td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr) attribute_hidden;
- #endif
|