summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-i386-low.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2005-07-13 15:21:02 +0000
committerDaniel Jacobowitz <dan@debian.org>2005-07-13 15:21:02 +0000
commite419b14d345f5fae8b72e6baaf9970b9a0569d19 (patch)
tree4b1db54f9c268d07021487516224f3d2db5b0218 /gdb/gdbserver/linux-i386-low.c
parent9582bfeef4fa973e11c2e8375d5f5b2879add19b (diff)
downloadgdb-e419b14d345f5fae8b72e6baaf9970b9a0569d19.tar.gz
* configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
is not available. Define HAVE_PTRACE_GETREGS if it is. * config.in, configure: Regenerated. * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64. * linux-i386-low.c, linux-m68k-low.c: Update to use HAVE_PTRACE_GETREGS. * linux-low.c (regsets_fetch_inferior_registers) (regsets_store_inferior_registers): Only return 0 if we processed GENERAL_REGS. * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New. * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
Diffstat (limited to 'gdb/gdbserver/linux-i386-low.c')
-rw-r--r--gdb/gdbserver/linux-i386-low.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/gdbserver/linux-i386-low.c b/gdb/gdbserver/linux-i386-low.c
index b2b92b0429b..4981fea5775 100644
--- a/gdb/gdbserver/linux-i386-low.c
+++ b/gdb/gdbserver/linux-i386-low.c
@@ -92,7 +92,7 @@ i386_cannot_fetch_register (int regno)
}
-#ifdef HAVE_LINUX_REGSETS
+#ifdef HAVE_PTRACE_GETREGS
#include <sys/procfs.h>
#include <sys/ptrace.h>
@@ -142,24 +142,25 @@ i386_store_fpxregset (const void *buf)
i387_fxsave_to_cache (buf);
}
+#endif /* HAVE_PTRACE_GETREGS */
struct regset_info target_regsets[] = {
+#ifdef HAVE_PTRACE_GETREGS
{ PTRACE_GETREGS, PTRACE_SETREGS, sizeof (elf_gregset_t),
GENERAL_REGS,
i386_fill_gregset, i386_store_gregset },
-#ifdef HAVE_PTRACE_GETFPXREGS
+# ifdef HAVE_PTRACE_GETFPXREGS
{ PTRACE_GETFPXREGS, PTRACE_SETFPXREGS, sizeof (elf_fpxregset_t),
EXTENDED_REGS,
i386_fill_fpxregset, i386_store_fpxregset },
-#endif
+# endif
{ PTRACE_GETFPREGS, PTRACE_SETFPREGS, sizeof (elf_fpregset_t),
FP_REGS,
i386_fill_fpregset, i386_store_fpregset },
+#endif /* HAVE_PTRACE_GETREGS */
{ 0, 0, -1, -1, NULL, NULL }
};
-#endif /* HAVE_LINUX_REGSETS */
-
static const unsigned char i386_breakpoint[] = { 0xCC };
#define i386_breakpoint_len 1