* 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>
This commit is contained in:
Ulrich Drepper 1999-11-02 16:04:00 +00:00
parent ecda4bdaa1
commit 03fc7ab6ed
13 changed files with 155 additions and 52 deletions

View File

@ -1,3 +1,13 @@
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.
1999-11-01 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/net/if_arp.h: Add ARPHDR_HWX25.

View File

@ -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.

View File

@ -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 *);

View File

@ -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));

View File

@ -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,

View File

@ -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"))

View File

@ -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;

View File

@ -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;

View File

@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <resource.h>
#include <sys/resource.h>
#include <sysdep.h>
#include <sys/syscall.h>
@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;