aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads_db
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-02 16:04:00 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-02 16:04:00 +0000
commit03fc7ab6ed4bc2f71964a3d31ad578821256b6bc (patch)
treec37b35125e60935a79ee0831af8902534f087a45 /linuxthreads_db
parentecda4bdaa1835e9a7865667690e3e264c25085e6 (diff)
downloadglibc-03fc7ab6ed4bc2f71964a3d31ad578821256b6bc.zip
glibc-03fc7ab6ed4bc2f71964a3d31ad578821256b6bc.tar.gz
glibc-03fc7ab6ed4bc2f71964a3d31ad578821256b6bc.tar.bz2
Update.
* sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Add more pr* types used by the debugger. * sysdeps/unix/sysv/linux/arm/sys/procfs.h: Likewise. * sysdeps/unix/sysv/linux/i386/sys/procfs.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: Likewise. * sysdeps/unix/sysv/linux/sys/procfs.h: Likewise. 1999-11-01 Ulrich Drepper <drepper@cygnus.com>
Diffstat (limited to 'linuxthreads_db')
-rw-r--r--linuxthreads_db/ChangeLog14
-rw-r--r--linuxthreads_db/proc_service.h29
-rw-r--r--linuxthreads_db/td_ta_new.c3
-rw-r--r--linuxthreads_db/thread_db.h63
-rw-r--r--linuxthreads_db/thread_dbP.h3
5 files changed, 65 insertions, 47 deletions
diff --git a/linuxthreads_db/ChangeLog b/linuxthreads_db/ChangeLog
index 6c11d92..e7dd8f6 100644
--- a/linuxthreads_db/ChangeLog
+++ b/linuxthreads_db/ChangeLog
@@ -1,3 +1,17 @@
+1999-11-01 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Add more pr* types used
+ by the debugger.
+ * sysdeps/unix/sysv/linux/arm/sys/procfs.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/sys/procfs.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: Likewise.
+ * sysdeps/unix/sysv/linux/sys/procfs.h: Likewise.
+ * thread_db.h: Shuffle types around to make things work for gdb.
+ * thread_dbP.h: Include proc_service.h before thread_db.h.
+
+ * td_ta_new.c: It's TD_NOLIBTHREAD, not TD_LIBTHREAD.
+
1999-10-14 Ulrich Drepper <drepper@cygnus.com>
* td_ta_new.c: p_startfct does not exist anymore.
diff --git a/linuxthreads_db/proc_service.h b/linuxthreads_db/proc_service.h
index 6e7fea8..108a866 100644
--- a/linuxthreads_db/proc_service.h
+++ b/linuxthreads_db/proc_service.h
@@ -1,4 +1,26 @@
-typedef enum {
+/* 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. 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 */
@@ -12,10 +34,6 @@ typedef enum {
*/
} ps_err_e;
-typedef unsigned long paddr_t;
-
-
-
struct ps_prochandle; /* user defined. */
@@ -41,4 +59,3 @@ 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 *);
-
diff --git a/linuxthreads_db/td_ta_new.c b/linuxthreads_db/td_ta_new.c
index 37d6bb1..8b22b75 100644
--- a/linuxthreads_db/td_ta_new.c
+++ b/linuxthreads_db/td_ta_new.c
@@ -16,7 +16,6 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-
Boston, MA 02111-1307, USA. */
#include <stddef.h>
@@ -36,7 +35,7 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
/* See whether the library contains the necessary symbols. */
if (ps_pglobal_lookup (ps, LIBPTHREAD_SO, "__pthread_threads_debug",
&addr) != PS_OK)
- return TD_LIBTHREAD;
+ return TD_NOLIBTHREAD;
/* Fill in the appropriate information. */
*ta = (td_thragent_t *) malloc (sizeof (td_thragent_t));
diff --git a/linuxthreads_db/thread_db.h b/linuxthreads_db/thread_db.h
index b1b6221..312237a 100644
--- a/linuxthreads_db/thread_db.h
+++ b/linuxthreads_db/thread_db.h
@@ -25,33 +25,33 @@
#include <pthread.h>
#include <stdint.h>
#include <sys/types.h>
-#include <sys/ucontext.h>
+#include <sys/procfs.h>
/* Error codes of the library. */
typedef enum
{
- TD_OK, /* No error. */
- TD_ERR, /* No further specified error. */
- TD_NOTHR, /* No matching thread found. */
- TD_NOSV, /* No matching synchronization handle found. */
- TD_NOLWP, /* No matching light-weighted process found. */
- TD_BADPH, /* Invalid process handle. */
- TD_BADTH, /* Invalid thread handle. */
- TD_BADSH, /* Invalid synchronization handle. */
- TD_BADTA, /* Invalid thread agent. */
- TD_BADKEY, /* Invalid key. */
- TD_NOMSG, /* No event available. */
- TD_NOFPREGS, /* No floating-point register content available. */
- TD_LIBTHREAD, /* Application not linked with thread library. */
- TD_NOEVENT, /* Requested event is not supported. */
- TD_NOCAPAB, /* Capability not available. */
- TD_DBERR, /* Internal debug library error. */
- TD_NOAPLIC, /* Operation is not applicable. */
- TD_NOTSD, /* No thread-specific data available. */
- TD_MALLOC, /* Out of memory. */
- TD_PARTIALREG,/* Not entire register set was read or written. */
- TD_NOXREGS /* X register set not available for given thread. */
+ TD_OK, /* No error. */
+ TD_ERR, /* No further specified error. */
+ TD_NOTHR, /* No matching thread found. */
+ TD_NOSV, /* No matching synchronization handle found. */
+ TD_NOLWP, /* No matching light-weighted process found. */
+ TD_BADPH, /* Invalid process handle. */
+ TD_BADTH, /* Invalid thread handle. */
+ TD_BADSH, /* Invalid synchronization handle. */
+ TD_BADTA, /* Invalid thread agent. */
+ TD_BADKEY, /* Invalid key. */
+ TD_NOMSG, /* No event available. */
+ TD_NOFPREGS, /* No floating-point register content available. */
+ TD_NOLIBTHREAD, /* Application not linked with thread library. */
+ TD_NOEVENT, /* Requested event is not supported. */
+ TD_NOCAPAB, /* Capability not available. */
+ TD_DBERR, /* Internal debug library error. */
+ TD_NOAPLIC, /* Operation is not applicable. */
+ TD_NOTSD, /* No thread-specific data available. */
+ TD_MALLOC, /* Out of memory. */
+ TD_PARTIALREG, /* Not entire register set was read or written. */
+ TD_NOXREGS /* X register set not available for given thread. */
} td_err_e;
@@ -81,9 +81,6 @@ typedef enum
/* Types of the debugging library. */
-/* Addresses. */
-typedef void *psaddr_t;
-
/* Handle for a process. This type is opaque. */
typedef struct td_thragent td_thragent_t;
@@ -229,10 +226,6 @@ typedef struct td_ta_stats
typedef pthread_t thread_t;
typedef pthread_key_t thread_key_t;
-/* Linux has different names for the register set types. */
-typedef gregset_t prgregset_t;
-typedef fpregset_t prfpregset_t;
-
/* Callback for iteration over threads. */
typedef int td_thr_iter_f __P ((const td_thrhandle_t *, void *));
@@ -245,10 +238,6 @@ typedef int td_key_iter_f __P ((thread_key_t, void (*) (void *), void *));
/* Forward declaration. This has to be defined by the user. */
struct ps_prochandle;
-/* We don't have any differences between processes and threads, therefore
- have only one PID type. */
-typedef pid_t lwpid_t;
-
/* Information about the thread. */
typedef struct td_thrinfo
@@ -359,11 +348,11 @@ extern td_err_e td_thr_get_info (const td_thrhandle_t *__th,
/* Retrieve floating-point register contents of process running thread TH. */
extern td_err_e td_thr_getfpregs (const td_thrhandle_t *__th,
- prfpregset_t *__regset);
+ fpregset_t *__regset);
/* Retrieve general register contents of process running thread TH. */
extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th,
- prgregset_t __gregs);
+ gregset_t __gregs);
/* Retrieve extended register contents of process running thread TH. */
extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs);
@@ -373,11 +362,11 @@ extern td_err_e td_thr_getxregsize (const td_thrhandle_t *__th, int *__sizep);
/* Set floating-point register contents of process running thread TH. */
extern td_err_e td_thr_setfpregs (const td_thrhandle_t *__th,
- const prfpregset_t *__fpregs);
+ const fpregset_t *__fpregs);
/* Set general register contents of process running thread TH. */
extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th,
- prgregset_t __gregs);
+ gregset_t __gregs);
/* Set extended register contents of process running thread TH. */
extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th,
diff --git a/linuxthreads_db/thread_dbP.h b/linuxthreads_db/thread_dbP.h
index 1fd09e9..0fd1c11 100644
--- a/linuxthreads_db/thread_dbP.h
+++ b/linuxthreads_db/thread_dbP.h
@@ -3,11 +3,10 @@
#define _THREAD_DBP_H 1
#include <string.h>
+#include "proc_service.h"
#include "thread_db.h"
#include "../linuxthreads/internals.h"
-#include "proc_service.h"
-
/* Comment out the following for less verbose output. */
#define LOG(c) __libc_write (2, c "\n", strlen (c "\n"))