diff options
author | Mark Kettenis <kettenis@gnu.org> | 2000-03-05 22:57:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2000-03-05 22:57:06 +0000 |
commit | 55dd26ad1eb43524b9261a29707d52e0f5317110 (patch) | |
tree | ed6426f41b5bfcb4458ce84de9d86463eb8b35af /gdb/config | |
parent | 9b52d432577555bc5f620b6c8c3b2bd481932b46 (diff) | |
download | gdb-55dd26ad1eb43524b9261a29707d52e0f5317110.tar.gz |
2000-03-05 Mark Kettenis <kettenis@gnu.org>
Allow GDB to run on Linux 2.0 again.
* config.in: Add HAVE_PTRACE_GETREGS.
* configure.in: Check if <sys/ptrace.h> defines PTRACE_GETREGS.
* configure: Regenerated.
* config/i386/nm-linux.h (CANNOT_FETCH_REGISTER,
CANNOT_STORE_REGISTER): New defines.
* i386-linux-nat.c (have_ptrace_getregs): New variable.
(PTRACE_XFER_TYPE, CANNOT_FETCH_REGISTER, fetch_register,
old_fetch_inferior_registers, CANNOT_STORE_REGISTER,
store_register, old_store_inferior_registers): Copied over from
`inptrace.c' as a temporary measure.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs):
Conditionalize on HAVE_PTRACE_GETREGS. Define stubs if
HAVE_PTRACE_GETREGS isn't defined.
(fetch_regs): Reset `have_ptrace_getregs' if ptrace call fails
with EIO.
(fetch_inferior_registers, store_inferior_registers): Fall back on
the method use in `infptrace.c' (by calling
old_fetch_inferior_registers and old_store_inferior_registers) if
`have_ptrace_getregs' isn't set.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/i386/nm-linux.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h index 93dfe46bbd7..1095fa0db62 100644 --- a/gdb/config/i386/nm-linux.h +++ b/gdb/config/i386/nm-linux.h @@ -1,5 +1,5 @@ /* Native support for GNU/Linux, for GDB, the GNU debugger. - Copyright (C) 1986, 1987, 1989, 1992, 1996, 1998 + Copyright (C) 1986, 1987, 1989, 1992, 1996, 1998, 2000 Free Software Foundation, Inc. This file is part of GDB. @@ -62,9 +62,16 @@ extern int kernel_u_size PARAMS ((void)); #include "solib.h" /* Support for shared libraries. */ #endif -/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ +/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ #define FETCH_INFERIOR_REGISTERS +/* Nevertheless, define CANNOT_{FETCH,STORE}_REGISTER, because we fall + back on the code `infptrace.c' (well a copy of that code in + `i386-linux-nat.c' for now) and we can access only the + general-purpose registers in that way. */ +#define CANNOT_FETCH_REGISTER(regno) ((regno) >= NUM_GREGS) +#define CANNOT_STORE_REGISTER(regno) CANNOT_FETCH_REGISTER (regno) + extern CORE_ADDR i386_stopped_by_watchpoint PARAMS ((int)); extern int |