From 03fc7ab6ed4bc2f71964a3d31ad578821256b6bc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 2 Nov 1999 16:04:00 +0000 Subject: 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 --- ChangeLog | 10 +++++ linuxthreads_db/ChangeLog | 14 +++++++ linuxthreads_db/proc_service.h | 29 ++++++++++--- linuxthreads_db/td_ta_new.c | 3 +- linuxthreads_db/thread_db.h | 63 ++++++++++++---------------- linuxthreads_db/thread_dbP.h | 3 +- sysdeps/unix/sysv/linux/alpha/sys/procfs.h | 12 ++++++ sysdeps/unix/sysv/linux/arm/sys/procfs.h | 12 ++++++ sysdeps/unix/sysv/linux/i386/getrlimit.c | 7 +++- sysdeps/unix/sysv/linux/i386/sys/procfs.h | 14 ++++++- sysdeps/unix/sysv/linux/mips/sys/procfs.h | 14 ++++++- sysdeps/unix/sysv/linux/powerpc/sys/procfs.h | 14 ++++++- sysdeps/unix/sysv/linux/sys/procfs.h | 12 ++++++ 13 files changed, 155 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index eafb209f27..7ad0e49a21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +1999-11-01 Ulrich Drepper + + * 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 * sysdeps/unix/sysv/linux/net/if_arp.h: Add ARPHDR_HWX25. diff --git a/linuxthreads_db/ChangeLog b/linuxthreads_db/ChangeLog index 6c11d92442..e7dd8f6162 100644 --- a/linuxthreads_db/ChangeLog +++ b/linuxthreads_db/ChangeLog @@ -1,3 +1,17 @@ +1999-11-01 Ulrich Drepper + + * 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 * 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 6e7fea8a89..108a86696e 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 + +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 37d6bb1d30..8b22b75ab3 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 @@ -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 b1b62211d5..312237ae23 100644 --- a/linuxthreads_db/thread_db.h +++ b/linuxthreads_db/thread_db.h @@ -25,33 +25,33 @@ #include #include #include -#include +#include /* 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 1fd09e965b..0fd1c11a28 100644 --- a/linuxthreads_db/thread_dbP.h +++ b/linuxthreads_db/thread_dbP.h @@ -3,11 +3,10 @@ #define _THREAD_DBP_H 1 #include +#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")) diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h index 7d4059664e..428563b39a 100644 --- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h @@ -101,6 +101,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h index e2f373155d..497c8e9b0b 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h @@ -91,6 +91,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/i386/getrlimit.c b/sysdeps/unix/sysv/linux/i386/getrlimit.c index 76f8caa7fa..25d0d3b458 100644 --- a/sysdeps/unix/sysv/linux/i386/getrlimit.c +++ b/sysdeps/unix/sysv/linux/i386/getrlimit.c @@ -17,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #include -#include +#include #include #include @@ -29,10 +29,12 @@ the limits are now unsigned. */ #if !defined __ASSUME_NEW_GETRLIMIT_SYSCALL && defined __NR_ugetrlimit static int no_new_getrlimit; +#else +# define no_new_getrlimit 0 #endif int -getrlimit (resource, rlimits) +__getrlimit (resource, rlimits) enum __rlimit_resource resource; struct rlimit *rlimits; { @@ -59,3 +61,4 @@ getrlimit (resource, rlimits) return INLINE_SYSCALL (getrlimit, 2, resource, rlimits); #endif } +weak_alias (__getrlimit, getrlimit) diff --git a/sysdeps/unix/sysv/linux/i386/sys/procfs.h b/sysdeps/unix/sysv/linux/i386/sys/procfs.h index d98d9f55f8..9c5528e1d1 100644 --- a/sysdeps/unix/sysv/linux/i386/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/i386/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -101,6 +101,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h index c97836f6e9..5a94de0de5 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -101,6 +101,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h b/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h index 8633e44cb7..8338778383 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -101,6 +101,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; diff --git a/sysdeps/unix/sysv/linux/sys/procfs.h b/sysdeps/unix/sysv/linux/sys/procfs.h index 0f48108d50..a2a30503c2 100644 --- a/sysdeps/unix/sysv/linux/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/sys/procfs.h @@ -96,6 +96,18 @@ struct elf_prpsinfo }; +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; -- cgit 1.4.1