1999-10-08 07:03:03 +00:00
|
|
|
/* Private header for thread debug library. */
|
|
|
|
#ifndef _THREAD_DBP_H
|
|
|
|
#define _THREAD_DBP_H 1
|
|
|
|
|
1999-10-12 16:00:04 +00:00
|
|
|
#include <string.h>
|
2002-03-03 19:43:30 +00:00
|
|
|
#include <unistd.h>
|
1999-11-02 16:04:00 +00:00
|
|
|
#include "proc_service.h"
|
1999-10-08 07:03:03 +00:00
|
|
|
#include "thread_db.h"
|
2002-02-05 00:57:29 +00:00
|
|
|
#include "../linuxthreads/descr.h"
|
1999-10-08 07:03:03 +00:00
|
|
|
|
|
|
|
|
2001-03-20 21:05:29 +00:00
|
|
|
/* Indeces for the symbol names. */
|
|
|
|
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,
|
2002-08-08 06:38:19 +00:00
|
|
|
LINUXTHREADS_INITIAL_REPORT_EVENTS,
|
2002-08-24 03:35:35 +00:00
|
|
|
LINUXTHREADS_VERSION,
|
2001-03-20 21:05:29 +00:00
|
|
|
NUM_MESSAGES
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-10-08 07:03:03 +00:00
|
|
|
/* Comment out the following for less verbose output. */
|
1999-11-22 20:53:18 +00:00
|
|
|
#ifndef NDEBUG
|
Update.
2004-05-03 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/bsd/bits/fcntl.h (F_SETOWN, F_GETOWN): Define if
__USE_BSD or __USE_UNIX98.
* sysdeps/unix/bsd/ultrix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
* sysdeps/unix/bsd/bsd4.4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
* sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/common/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
* sysdeps/unix/sysv/aix/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
* sysdeps/unix/sysv/irix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
*sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (F_SETOWN, F_GETOWN):
Likewise.
* sysdeps/generic/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
* sysdeps/mach/hurd/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise.
* io/sys/stat.h (S_ISSOCK, S_IFSOCK): Likewise.
2004-05-01 Jakub Jelinek <jakub@redhat.com>
* posix/Versions (libc): Remove __libc_wait, __libc_waitpid,
__libc_pause, __libc_nanosleep, __libc_pread, __libc_pread64,
__libc_pwrite64, __waitid and __pselect @@GLIBC_PRIVATE.
* stdlib/Versions (libc): Remove __on_exit@@GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/Versions (libc): Remove
__libc_sigaction@@GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/x86_64/Versions (libc): Remove
__modify_ldt@@GLIBC_PRIVATE.
* socket/Versions (libc): Remove __libc_accept, __libc_send,
__libc_recvfrom, __libc_recvmsg, __libc_sendmsg, __libc_recv,
__libc_sendto and __libc_connect @@GLIBC_PRIVATE.
* stdio-common/Versions (libc): Remove
_itoa_upper_digits@@GLIBC_PRIVATE.
* resolv/Versions (libresolv): Remove __ns_samename@@GLIBC_PRIVATE.
* misc/Versions (libc): Remove __libc_fsync, __libc_msync,
__libc_readv and __libc_writev @@GLIBC_PRIVATE.
* termios/Versions (libc): Remove __libc_tcdrain@@GLIBC_PRIVATE.
* io/Versions (libc): Remove __libc_open, __libc_close, __libc_read,
__libc_write, __libc_lseek, __libc_fcntl, __libc_open64 and
__libc_lseek64 @@GLIBC_PRIVATE.
2004-04-30 Jakub Jelinek <jakub@redhat.com>
* elf/dl-load.c (open_verify): Move e_phentsize check after e_type
check.
2004-04-29 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/powerpc64/fpu/s_ceil.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_floor.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_floorf.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_llrint.c: Removed.
* sysdeps/powerpc/powerpc64/fpu/s_llrint.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_llrintf.c: Removed.
* sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_llround.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_lround.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_lroundf.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_rint.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_rintf.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_round.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_roundf.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_trunc.S: New file.
* sysdeps/powerpc/powerpc64/fpu/s_truncf.S: New file.
* math/test-misc.c [LDBL_MANT_DIG == 106](main): Correct LDBL_MAX
mantissa for AIX long double format.
* misc/qefgcvt.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Define for AIX
long double format.
* misc/qefgcvt_r.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Likewise.
* stdlib/fpioconst.c [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024]
(_fpioconst_pow10): AIX long double format has same exponent range as
double.
* stdlib/fpioconst.h [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024]
(LDBL_MAX_10_EXP_LOG): AIX long double format has same exponent range
as double.
2004-04-23 Art Haas <ahaas@airmail.net>
* sysdeps/unix/sysv/linux/kernel-features.h: Add 'defined'.
2004-05-03 21:40:12 +00:00
|
|
|
# define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n"))
|
1999-11-22 20:53:18 +00:00
|
|
|
extern int __td_debug;
|
|
|
|
#else
|
|
|
|
# define LOG(c)
|
|
|
|
#endif
|
1999-10-08 07:03:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Handle for a process. This type is opaque. */
|
|
|
|
struct td_thragent
|
|
|
|
{
|
|
|
|
/* Delivered by the debugger and we have to pass it back in the
|
|
|
|
proc callbacks. */
|
|
|
|
struct ps_prochandle *ph;
|
|
|
|
|
|
|
|
/* Some cached information. */
|
|
|
|
|
|
|
|
/* Address of the `__pthread_handles' array. */
|
|
|
|
struct pthread_handle_struct *handles;
|
|
|
|
|
|
|
|
/* Address of the `pthread_kyes' array. */
|
|
|
|
struct pthread_key_struct *keys;
|
|
|
|
|
|
|
|
/* Maximum number of threads. */
|
|
|
|
int pthread_threads_max;
|
|
|
|
|
|
|
|
/* Maximum number of thread-local data keys. */
|
|
|
|
int pthread_keys_max;
|
|
|
|
|
|
|
|
/* Size of 2nd level array for thread-local data keys. */
|
|
|
|
int pthread_key_2ndlevel_size;
|
|
|
|
|
|
|
|
/* Sizeof struct _pthread_descr_struct. */
|
|
|
|
int sizeof_descr;
|
1999-11-02 23:44:42 +00:00
|
|
|
|
|
|
|
/* Pointer to the `__pthread_threads_events' variable in the target. */
|
|
|
|
psaddr_t pthread_threads_eventsp;
|
1999-11-03 06:13:09 +00:00
|
|
|
|
|
|
|
/* Pointer to the `__pthread_last_event' variable in the target. */
|
|
|
|
psaddr_t pthread_last_event;
|
|
|
|
|
|
|
|
/* Pointer to the `__pthread_handles_num' variable. */
|
|
|
|
psaddr_t pthread_handles_num;
|
1999-10-08 07:03:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-11-05 02:26:16 +00:00
|
|
|
/* Type used internally to keep track of thread agent descriptors. */
|
|
|
|
struct agent_list
|
|
|
|
{
|
|
|
|
td_thragent_t *ta;
|
|
|
|
struct agent_list *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* List of all known descriptors. */
|
|
|
|
extern struct agent_list *__td_agent_list;
|
|
|
|
|
|
|
|
/* Function used to test for correct thread agent pointer. */
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2001-03-20 21:05:29 +00:00
|
|
|
|
|
|
|
/* Internal wrapper around ps_pglobal_lookup. */
|
|
|
|
extern int td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr);
|
|
|
|
|
1999-10-08 07:03:03 +00:00
|
|
|
#endif /* thread_dbP.h */
|