summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old_db
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads.old_db')
-rw-r--r--libpthread/linuxthreads.old_db/Banner1
-rw-r--r--libpthread/linuxthreads.old_db/Makefile13
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in78
-rw-r--r--libpthread/linuxthreads.old_db/Versions24
-rw-r--r--libpthread/linuxthreads.old_db/proc_service.h69
-rw-r--r--libpthread/linuxthreads.old_db/td_init.c32
-rw-r--r--libpthread/linuxthreads.old_db/td_log.c31
-rw-r--r--libpthread/linuxthreads.old_db/td_symbol_list.c60
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_clear_event.c50
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_delete.c57
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_enable_stats.c34
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_event_addr.c72
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_event_getmsg.c127
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_get_nthreads.c41
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_get_ph.c35
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_get_stats.c34
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_id2thr.c77
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c89
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_new.c148
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_reset_stats.c34
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_set_event.c50
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_setconcurrency.c34
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_thr_iter.c172
-rw-r--r--libpthread/linuxthreads.old_db/td_ta_tsd_iter.c54
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_clear_event.c59
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_dbresume.c29
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_dbsuspend.c29
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_event_enable.c54
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_event_getmsg.c64
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_get_info.c82
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getfpregs.c57
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getgregs.c57
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getxregs.c29
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_getxregsize.c29
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_set_event.c59
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setfpregs.c46
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setgregs.c46
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setprio.c29
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setsigpending.c30
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_setxregs.c29
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_sigsetmask.c29
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c68
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_tsd.c80
-rw-r--r--libpthread/linuxthreads.old_db/td_thr_validate.c68
-rw-r--r--libpthread/linuxthreads.old_db/thread_db.h458
-rw-r--r--libpthread/linuxthreads.old_db/thread_dbP.h108
46 files changed, 2955 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..f9100219a
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/Makefile
@@ -0,0 +1,13 @@
+# 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.
+#
+
+top_srcdir=../../
+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..cf0ceb394
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -0,0 +1,78 @@
+# Makefile for uClibc
+#
+# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
+#
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+#
+
+subdirs += libpthread/linuxthreads.old_db
+
+# Get the thread include dependencies and shared object name
+CFLAGS-libpthread/linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\""
+
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
+ifeq ($(DOSTRIP),y)
+LDFLAGS-libthread_db.so += -Wl,-s
+endif
+
+LIBS-libthread_db.so := $(LIBS)
+
+libthread_db_FULL_NAME := libthread_db-$(VERSION).so
+
+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-so-y := $(libthread_db_OBJ:.o=.os)
+ifeq ($(DOPIC),y)
+libthread_db-a-y := $(libthread_db-so-y)
+else
+libthread_db-a-y := $(libthread_db_OBJ)
+endif
+
+lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
+lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
+
+#ifeq ($(DOMULTI),n)
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc.depend)
+else
+$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc.depend)
+endif
+ $(call link.so,$(libthread_db_FULL_NAME),1)
+#else
+#$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db.oS | $(libc.depend)
+# $(call linkm.so,$(libthread_db_FULL_NAME),1)
+#endif
+
+$(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
+ $(Q)$(RM) $@
+ $(do_ar)
+
+$(libthread_db_OUT)/libthread_db.oS: $(libthread_db_SRC)
+ $(Q)$(RM) $@
+ $(compile-m)
+
+$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
+ $(Q)$(INSTALL) -d $(dir $@)
+ $(Q)$(RM) $@
+ $(do_ar)
+
+$(top_builddir)include/thread_db.h:
+ $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@
+
+linuxthreads_db_headers := $(top_builddir)include/thread_db.h
+$(linuxthreads_db_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h))
+headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
+
+objclean-y += CLEAN_libpthread/linuxthreads.old_db
+headers_clean-y += HEADERCLEAN_libpthread/linuxthreads.old_db
+
+HEADERCLEAN_libpthread/linuxthreads.old_db:
+ $(do_rm) $(linuxthreads_db_headers)
+
+CLEAN_libpthread/linuxthreads.old_db:
+ $(do_rm) $(addprefix $(libthread_db_OUT)/*., o os oS a)
diff --git a/libpthread/linuxthreads.old_db/Versions b/libpthread/linuxthreads.old_db/Versions
new file mode 100644
index 000000000..063493c67
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/Versions
@@ -0,0 +1,24 @@
+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;
+ }
+ GLIBC_2.3.3 {
+ td_thr_tlsbase;
+ }
+}
diff --git a/libpthread/linuxthreads.old_db/proc_service.h b/libpthread/linuxthreads.old_db/proc_service.h
new file mode 100644
index 000000000..6f33ccdda
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/proc_service.h
@@ -0,0 +1,69 @@
+/* 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, see
+ <http://www.gnu.org/licenses/>. */
+
+/* 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..ecb0d3de2
--- /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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "thread_dbP.h"
+
+#ifndef NDEBUG
+int __td_debug;
+#endif
+
+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..c82ffa54d
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_log.c
@@ -0,0 +1,31 @@
+/* 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#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..f62cd692c
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_symbol_list.c
@@ -0,0 +1,60 @@
+/* Return list of symbols the library can request.
+ Copyright (C) 2001, 2002, 2003 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+#include "thread_dbP.h"
+
+#ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define DOT "." /* PPC64 requires . prefix on code symbols. */
+#else
+# define DOT /* No prefix. */
+#endif
+
+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] = DOT "__linuxthreads_create_event",
+ [LINUXTHREADS_DEATH_EVENT] = DOT "__linuxthreads_death_event",
+ [LINUXTHREADS_REAP_EVENT] = DOT "__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..e827b46ae
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_clear_event.c
@@ -0,0 +1,50 @@
+/* Globally disable events.
+ Copyright (C) 1999, 2001, 2005 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "thread_dbP.h"
+
+
+td_err_e
+td_ta_clear_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_thr_events_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_thr_events_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..9bc5c08ac
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_delete.c
@@ -0,0 +1,57 @@
+/* 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#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 descriptor 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..9d3408ece
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_enable_stats.c
@@ -0,0 +1,34 @@
+/* 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#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..72d426555
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_event_addr.c
@@ -0,0 +1,72 @@
+/* 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#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..b7c2fcd72
--- /dev/null
+++ b/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
@@ -0,0 +1,127 @@
+/* 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+#include <string.h>
+
+#include "thread_dbP.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)
+ return TD_ERR; /* XXX Other error value? */
+
+ /* Check whether