aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdith Epstein <eepstein@cygnus>1998-12-08 20:41:19 +0000
committerEdith Epstein <eepstein@cygnus>1998-12-08 20:41:19 +0000
commit1994dc7cfca6b07c3cb5fa80a18ad36f76de95f9 (patch)
tree0825584babe92aa087c25bdcb3500d9f585a94fb /gdb/gdbserver
parent * read.c (output_leb128): Don't mark as inline. (diff)
downloadbinutils-gdb-1994dc7cfca6b07c3cb5fa80a18ad36f76de95f9.tar.gz
binutils-gdb-1994dc7cfca6b07c3cb5fa80a18ad36f76de95f9.tar.bz2
binutils-gdb-1994dc7cfca6b07c3cb5fa80a18ad36f76de95f9.zip
Tue Dec 8 15:09:44 1998 Edith Epstein <eepstein@sophia.cygnus.com>
* config/m68k/tm-m68k.h (NUM_FREGS): m68k-linux patch. Added NUM_FREGS macro. * config/m68k/xm-linux.h: m68k-linux patch. New file. * config/m68k/tm-linux.h: m68k-linux patch. New file. * config/m68k/nm-linux.h: m68k-linux patch. New file. * config/m68k/linux.mt: m68k-linux patch. New file. * config/m68k/linux.mh: m68k-linux patch. New file. * gdbserver/low-linux.c: m68k-linux patch. Added an ifdef that checks the value of __GLIBC to decide whether or not to include sys/reg.h. * m68klinux-nat.c: m68k-linux patch. New file. Note both m68k-tdep.c and m68klinux-nat.c contain definitions for supply_gregset and supply_fpregset. The definitions in m68k-tdep.c are valid is USE_PROC_FS is defined. Otherwise, the definitions in m68klinux-nat.c will be used. This is a bit of a hack. The supply_* routines do not belong in *_tdep.c files. But, there are several lynx ports that currently depend on these definitions. * configure.tgt: m68k-linux patch. Added m68*-*-linux* gdb_target. * configure.host: m68k-linux patch. Added m68*-*-linux* gdb_host. * Makefile.in: m68k-linux patch. Added compile line for m68klinux-nat.o
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/low-linux.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/gdb/gdbserver/low-linux.c b/gdb/gdbserver/low-linux.c
index a260575222a..106021057a3 100644
--- a/gdb/gdbserver/low-linux.c
+++ b/gdb/gdbserver/low-linux.c
@@ -45,8 +45,9 @@ char buf2[MAX_REGISTER_RAW_SIZE];
/***************End MY defs*********************/
#include <sys/ptrace.h>
-#if 0
-#include <machine/reg.h>
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <sys/reg.h>
#endif
extern char **environ;
@@ -165,6 +166,7 @@ myresume (step, signal)
- KERNEL_U_ADDR
#endif
+#ifndef TARGET_M68K
/* this table must line up with REGISTER_NAMES in tm-i386v.h */
/* symbols like 'EAX' come from <sys/reg.h> */
static int regmap[] =
@@ -198,6 +200,37 @@ i386_register_u_addr (blockend, regnum)
return (blockend + 4 * regmap[regnum]);
}
+#else /* TARGET_M68K */
+/* This table must line up with REGISTER_NAMES in tm-m68k.h */
+static int regmap[] =
+{
+#ifdef PT_D0
+ PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
+ PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP,
+ PT_SR, PT_PC,
+#else
+ 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15,
+ 17, 18,
+#endif
+#ifdef PT_FP0
+ PT_FP0, PT_FP1, PT_FP2, PT_FP3, PT_FP4, PT_FP5, PT_FP6, PT_FP7,
+ PT_FPCR, PT_FPSR, PT_FPIAR
+#else
+ 21, 24, 27, 30, 33, 36, 39, 42, 45, 46, 47
+#endif
+};
+
+/* BLOCKEND is the value of u.u_ar0, and points to the place where GS
+ is stored. */
+
+int
+m68k_linux_register_u_addr (blockend, regnum)
+ int blockend;
+ int regnum;
+{
+ return (blockend + 4 * regmap[regnum]);
+}
+#endif
CORE_ADDR
register_addr (regno, blockend)