summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old_db
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-15 03:13:04 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-15 03:13:04 +0000
commita9f5aa1cc96fc2c71f19a9c3e9dcbee0e78f83ca (patch)
tree2c5d251bdfd06d0a76cec9fc507b1873b4bbbdad /libpthread/linuxthreads.old_db
parentfd6dde5a19092be5bb1990dadd5c595d2ed0b3aa (diff)
rename current stable linuxthreads to linuxthreads.old to prepare for import of latest glibc version
Diffstat (limited to 'libpthread/linuxthreads.old_db')
-rw-r--r--libpthread/linuxthreads.old_db/Banner1
-rw-r--r--libpthread/linuxthreads.old_db/Makefile15
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in43
-rw-r--r--libpthread/linuxthreads.old_db/Versions21
-rw-r--r--libpthread/linuxthreads.old_db/proc_service.h70
-rw-r--r--libpthread/linuxthreads.old_db/td_init.c32
-rw-r--r--libpthread/linuxthreads.old_db/td_log.c32
-rw-r--r--libpthread/linuxthreads.old_db/td_symbol_list.c56
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_clear_event.c53
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_delete.c58
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_enable_stats.c35
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_event_addr.c73
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_event_getmsg.c129
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_get_nthreads.c42
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_get_ph.c36
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_get_stats.c35
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_id2thr.c79
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c91
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_new.c150
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_reset_stats.c35
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_set_event.c53
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_setconcurrency.c35
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_thr_iter.c174
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_tsd_iter.c56
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_clear_event.c62
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_dbresume.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_dbsuspend.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_event_enable.c57
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_event_getmsg.c65
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_get_info.c83
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getfpregs.c58
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getgregs.c58
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getxregs.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getxregsize.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_set_event.c62
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setfpregs.c47
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setgregs.c47
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setprio.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setsigpending.c31
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setxregs.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_sigsetmask.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c70
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tsd.c82
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_validate.c70
-rw-r--r--libpthread/linuxthreads.old_db/thread_db.h451
-rw-r--r--libpthread/linuxthreads.old_db/thread_dbP.h110
46 files changed, 2967 insertions, 0 deletions
diff --git a/libpthread/linuxthreads.old_db/Banner b/libpthread/linuxthreads.old_db/Banner
new file mode 100644
index 000000000..6f4f3f818
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/Banner
@@ -0,0 +1 @@
+libthread_db work sponsored by Alpha Processor Inc
diff --git a/libpthread/linuxthreads.old_db/Makefile b/libpthread/linuxthreads.old_db/Makefile
new file mode 100644
index 000000000..f92f205a5
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/Makefile
@@ -0,0 +1,15 @@
+# Makefile for uClibc
+#
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+#
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+#
+
+TOPDIR=../../
+
+top_srcdir=$(TOPDIR)
+top_builddir=../../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in
new file mode 100644
index 000000000..0e29c7c18
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -0,0 +1,43 @@
+# Makefile for uClibc
+#
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+#
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+#
+
+#CFLAGS+=$(SSP_ALL_CFLAGS)
+
+PT_MAJOR_VERSION:=$(MAJOR_VERSION)
+# Get the thread include dependencies and shared object name
+CFLAGS+=-DLIBPTHREAD_SO="\"libpthread.so.$(PT_MAJOR_VERSION)\""
+
+# Remove any -z defs since this lib will have undefined symbols
+LDFLAGS:=$(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
+
+ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
+STRIP_FLAGS:=-X --strip-debug -R .note -R .comment
+endif
+
+DOMULTI=n
+
+LIB_NAME:=libthread_db
+libthread_db_FULL_NAME:=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+
+MAJOR_VERSION:=1
+
+libthread_db_DIR:=$(top_srcdir)libpthread/linuxthreads.old_db
+libthread_db_OUT:=$(top_builddir)libpthread/linuxthreads.old_db
+
+libthread_db_SRC:=$(wildcard $(libthread_db_DIR)/*.c)
+
+libthread_db_OBJ:=$(patsubst $(libthread_db_DIR)/%.c,$(libthread_db_OUT)/%.o,$(libthread_db_SRC))
+
+libthread_db-a-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ)
+libthread_db-so-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_OBJ:.o=.os)
+
+libthread_db-multi-$(PTHREADS_DEBUG_SUPPORT)+=$(libthread_db_SRC)
+
+objclean-y+=libthread_db_clean
+
+lib-a-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.a
+lib-so-$(PTHREADS_DEBUG_SUPPORT)+=$(top_builddir)lib/libthread_db.so
diff --git a/libpthread/linuxthreads.old_db/Versions b/libpthread/linuxthreads.old_db/Versions
new file mode 100644
index 000000000..4ca8042c1
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/Versions
@@ -0,0 +1,21 @@
+libthread_db {
+ GLIBC_2.1.3 {
+ # t*
+ td_init; td_log; td_ta_clear_event; td_ta_delete; td_ta_enable_stats;
+ td_ta_event_addr; td_ta_event_getmsg; td_ta_get_nthreads; td_ta_get_ph;
+ td_ta_get_stats; td_ta_map_id2thr; td_ta_map_lwp2thr; td_ta_new;
+ td_ta_reset_stats; td_ta_set_event; td_ta_setconcurrency;
+ td_ta_thr_iter; td_ta_tsd_iter; td_thr_clear_event; td_thr_dbresume;
+ td_thr_dbsuspend; td_thr_event_enable; td_thr_event_getmsg;
+ td_thr_get_info; td_thr_getfpregs; td_thr_getgregs; td_thr_getxregs;
+ td_thr_getxregsize; td_thr_set_event; td_thr_setfpregs; td_thr_setgregs;
+ td_thr_setprio; td_thr_setsigpending; td_thr_setxregs; td_thr_sigsetmask;
+ td_thr_tsd; td_thr_validate;
+ }
+ GLIBC_2.2.3 {
+ td_symbol_list;
+ }
+ GLIBC_2.3 {
+ td_thr_tls_get_addr;
+ }
+}
diff --git a/libpthread/linuxthreads.old_db/proc_service.h b/libpthread/linuxthreads.old_db/proc_service.h
new file mode 100644
index 000000000..74136c03e
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/proc_service.h
@@ -0,0 +1,70 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The definitions in this file must correspond to those in the debugger. */
+#include <sys/procfs.h>
+
+typedef enum
+{
+ PS_OK, /* generic "call succeeded" */
+ PS_ERR, /* generic. */
+ PS_BADPID, /* bad process handle */
+ PS_BADLID, /* bad lwp identifier */
+ PS_BADADDR, /* bad address */
+ PS_NOSYM, /* p_lookup() could not find given symbol */
+ PS_NOFREGS
+ /*
+ * FPU register set not available for given
+ * lwp
+ */
+} ps_err_e;
+
+
+struct ps_prochandle; /* user defined. */
+
+
+extern ps_err_e ps_pdread(struct ps_prochandle *,
+ psaddr_t, void *, size_t);
+extern ps_err_e ps_pdwrite(struct ps_prochandle *,
+ psaddr_t, const void *, size_t);
+extern ps_err_e ps_ptread(struct ps_prochandle *,
+ psaddr_t, void *, size_t);
+extern ps_err_e ps_ptwrite(struct ps_prochandle *,
+ psaddr_t, const void *, size_t);
+
+extern ps_err_e ps_pglobal_lookup(struct ps_prochandle *,
+ const char *object_name, const char *sym_name, psaddr_t *sym_addr);
+
+
+extern ps_err_e ps_lgetregs(struct ps_prochandle *,
+ lwpid_t, prgregset_t);
+extern ps_err_e ps_lsetregs(struct ps_prochandle *,
+ lwpid_t, const prgregset_t);
+extern ps_err_e ps_lgetfpregs(struct ps_prochandle *,
+ lwpid_t, prfpregset_t *);
+extern ps_err_e ps_lsetfpregs(struct ps_prochandle *,
+ lwpid_t, const prfpregset_t *);
+
+extern pid_t ps_getpid (struct ps_prochandle *);
+
+
+extern ps_err_e ps_pstop (const struct ps_prochandle *);
+extern ps_err_e ps_pcontinue (const struct ps_prochandle *);
+
+extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t);
+extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t);
diff --git a/libpthread/linuxthreads.old_db/td_init.c b/libpthread/linuxthreads.old_db/td_init.c
new file mode 100644
index 000000000..d714f1ba0
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_init.c
@@ -0,0 +1,32 @@
+/* Initialization function of thread debugger support library.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "thread_dbP.h"
+
+int __td_debug;
+
+
+td_err_e
+td_init (void)
+{
+ /* XXX We have to figure out what has to be done. */
+ LOG ("td_init");
+ return TD_OK;
+}
diff --git a/libpthread/linuxthreads.old_db/td_log.c b/libpthread/linuxthreads.old_db/td_log.c
new file mode 100644
index 000000000..025273a63
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_log.c
@@ -0,0 +1,32 @@
+/* Noop, left for historical reasons.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "thread_dbP.h"
+
+
+td_err_e
+td_log (void)
+{
+ /* This interface is deprecated in the Sun interface. We provide it
+ for compatibility but don't do anything ourself. We might in
+ future do some logging if this seems reasonable. */
+ LOG ("td_log");
+ return TD_OK;
+}
diff --git a/libpthread/linuxthreads.old_db/td_symbol_list.c b/libpthread/linuxthreads.old_db/td_symbol_list.c
new file mode 100644
index 000000000..779332b9d
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_symbol_list.c
@@ -0,0 +1,56 @@
+/* Return list of symbols the library can request.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <assert.h>
+#include "thread_dbP.h"
+
+
+static const char *symbol_list_arr[] =
+{
+ [PTHREAD_THREADS_EVENTS] = "__pthread_threads_events",
+ [PTHREAD_LAST_EVENT] = "__pthread_last_event",
+ [PTHREAD_HANDLES_NUM] = "__pthread_handles_num",
+ [PTHREAD_HANDLES] = "__pthread_handles",
+ [PTHREAD_KEYS] = "pthread_keys",
+ [LINUXTHREADS_PTHREAD_THREADS_MAX] = "__linuxthreads_pthread_threads_max",
+ [LINUXTHREADS_PTHREAD_KEYS_MAX] = "__linuxthreads_pthread_keys_max",
+ [LINUXTHREADS_PTHREAD_SIZEOF_DESCR] = "__linuxthreads_pthread_sizeof_descr",
+ [LINUXTHREADS_CREATE_EVENT] = "__linuxthreads_create_event",
+ [LINUXTHREADS_DEATH_EVENT] = "__linuxthreads_death_event",
+ [LINUXTHREADS_REAP_EVENT] = "__linuxthreads_reap_event",
+ [LINUXTHREADS_INITIAL_REPORT_EVENTS] = "__linuxthreads_initial_report_events",
+ [LINUXTHREADS_VERSION] = "__linuxthreads_version",
+ [NUM_MESSAGES] = NULL
+};
+
+
+const char **
+td_symbol_list (void)
+{
+ return symbol_list_arr;
+}
+
+
+int
+td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr)
+{
+ assert (idx >= 0 && idx < NUM_MESSAGES);
+ return ps_pglobal_lookup (ps, LIBPTHREAD_SO, symbol_list_arr[idx], sym_addr);
+}
diff --git a/libpthread/linuxthreads.old_db/td_ta_clear_event.c b/libpthread/linuxthreads.old_db/td_ta_clear_event.c
new file mode 100644
index 000000000..bdbcf47aa
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_clear_event.c
@@ -0,0 +1,53 @@
+/* Globally disable events.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "thread_dbP.h"
+
+
+td_err_e
+td_ta_clear_event (ta, event)
+ const td_thragent_t *ta;
+ td_thr_events_t *event;
+{
+ td_thr_events_t old_event;
+ int i;
+
+ LOG ("td_ta_clear_event");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+ return TD_BADTA;
+
+ /* Write the new value into the thread data structure. */
+ if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
+ &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ return TD_ERR; /* XXX Other error value? */
+
+ /* Remove the set bits in. */
+ for (i = 0; i < TD_EVENTSIZE; ++i)
+ old_event.event_bits[i] &= ~event->event_bits[i];
+
+ /* Write the new value into the thread data structure. */
+ if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
+ &old_event, sizeof (td_thrhandle_t)) != PS_OK)
+ return TD_ERR; /* XXX Other error value? */
+
+ return TD_OK;
+}
diff --git a/libpthread/linuxthreads.old_db/td_ta_delete.c b/libpthread/linuxthreads.old_db/td_ta_delete.c
new file mode 100644
index 000000000..0e6ec17d0
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_delete.c
@@ -0,0 +1,58 @@
+/* Detach to target process.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdlib.h>
+
+#include "thread_dbP.h"
+
+
+td_err_e
+td_ta_delete (td_thragent_t *ta)
+{
+ LOG ("td_ta_delete");
+
+ /* Safety check. */
+ if (ta == NULL || __td_agent_list == NULL)
+ return TD_BADTA;
+
+ /* Remove the handle from the list. */
+ if (ta == __td_agent_list->ta)
+ /* It's the first element of the list. */
+ __td_agent_list = __td_agent_list->next;
+ else
+ {
+ /* We have to search for it. */
+ struct agent_list *runp = __td_agent_list;
+
+ while (runp->next != NULL && runp->next->ta != ta)
+ runp = runp->next;
+
+ if (runp->next == NULL)
+ /* It's not a valid decriptor since it is not in the list. */
+ return TD_BADTA;
+
+ runp->next = runp->next->next;
+ }
+
+ /* The handle was allocated in `td_ta_new'. */
+ free (ta);
+
+ return TD_OK;
+}
diff --git a/libpthread/linuxthreads.old_db/td_ta_enable_stats.c b/libpthread/linuxthreads.old_db/td_ta_enable_stats.c
new file mode 100644
index 000000000..1d4c34a8d
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_enable_stats.c
@@ -0,0 +1,35 @@
+/* Enable collection of statistics for process.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "thread_dbP.h"
+
+
+td_err_e
+td_ta_enable_stats (const td_thragent_t *ta, int enable)
+{
+ /* XXX We have to figure out what has to be done. */
+ LOG ("td_ta_enable_stats");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+ return TD_BADTA;
+
+ return TD_OK;
+}
diff --git a/libpthread/linuxthreads.old_db/td_ta_event_addr.c b/libpthread/linuxthreads.old_db/td_ta_event_addr.c
new file mode 100644
index 000000000..8bce35ae8
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_event_addr.c
@@ -0,0 +1,73 @@
+/* Get event address.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "thread_dbP.h"
+
+
+td_err_e
+td_ta_event_addr (const td_thragent_t *ta, td_event_e event, td_notify_t *addr)
+{
+ td_err_e res = TD_NOEVENT;
+ int idx = -1;
+
+ LOG ("td_ta_event_addr");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+ return TD_BADTA;
+
+ switch (event)
+ {
+ case TD_CREATE:
+ idx = LINUXTHREADS_CREATE_EVENT;
+ break;
+
+ case TD_DEATH:
+ idx = LINUXTHREADS_DEATH_EVENT;
+ break;
+
+ case TD_REAP:
+ idx = LINUXTHREADS_REAP_EVENT;
+ break;
+
+ default:
+ /* Event cannot be handled. */
+ break;
+ }
+
+ /* Now get the address. */
+ if (idx != -1)
+ {
+ psaddr_t taddr;
+
+ if (td_lookup (ta->ph, idx, &taddr) == PS_OK)
+ {
+ /* Success, we got the address. */
+ addr->type = NOTIFY_BPT;
+ addr->u.bptaddr = taddr;
+
+ res = TD_OK;
+ }
+ else
+ res = TD_ERR;
+ }
+
+ return res;
+}
diff --git a/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c b/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
new file mode 100644
index 000000000..c004a5b79
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
@@ -0,0 +1,129 @@
+/* Retrieve event.
+ Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stddef.h>
+#include <string.h>
+
+#include "thread_dbP.h"
+#include "../linuxthreads.old/internals.h"
+
+
+td_err_e
+td_ta_event_getmsg (const td_thragent_t *ta, td_event_msg_t *msg)
+{
+ /* XXX I cannot think of another way but using a static variable. */
+ static td_thrhandle_t th;
+ td_eventbuf_t event;
+ psaddr_t addr;
+
+ LOG ("td_ta_event_getmsg");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+ return TD_BADTA;
+
+ /* Get the pointer to the thread descriptor with the last event. */
+ if (ps_pdread (ta->ph, ta->pthread_last_event,
+ &addr, sizeof (void *)) != PS_OK)
+ return TD_ERR; /* XXX Other error value? */
+
+ /* If the pointer is NULL no event occurred. */
+ if (addr == 0)
+ return TD_NOMSG;
+
+ /* Read the even structure from the target. */
+ if (ps_pdread (ta->ph,
+ ((char *) addr
+ + offsetof (struct _pthread_descr_struct, p_eventbuf)),
+ &event, sizeof (td_eventbuf_t)) != PS_OK)