aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-07-02 19:18:14 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-07-02 19:18:14 +0000
commitc649a7c231438b704b3b93f57402e242dab874ff (patch)
treeb34b6e95c92dcbd2c4ff67661cc2bba0e9a9b7b8 /gdb
parenta44cce764756d2504c059b77af3876fc36d34ce1 (diff)
downloadgdb-c649a7c231438b704b3b93f57402e242dab874ff.zip
gdb-c649a7c231438b704b3b93f57402e242dab874ff.tar.gz
gdb-c649a7c231438b704b3b93f57402e242dab874ff.tar.bz2
* configure.in, config/m68k/*delta68*, delta68-nat.c: New port.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/config/m68k/delta68.mh6
-rw-r--r--gdb/config/m68k/delta68.mt3
-rw-r--r--gdb/config/m68k/nm-delta68.h22
-rw-r--r--gdb/config/m68k/tm-delta68.h37
-rw-r--r--gdb/config/m68k/xm-delta68.h36
-rw-r--r--gdb/configure.in2
-rw-r--r--gdb/delta68-nat.c56
7 files changed, 162 insertions, 0 deletions
diff --git a/gdb/config/m68k/delta68.mh b/gdb/config/m68k/delta68.mh
index e69de29..677cb66 100644
--- a/gdb/config/m68k/delta68.mh
+++ b/gdb/config/m68k/delta68.mh
@@ -0,0 +1,6 @@
+# Motorola Delta Series sysV68 R3V7.1
+XM_FILE= xm-delta68.h
+REGEX=regex.o
+REGEX1=regex.o
+NAT_FILE= nm-delta.h
+NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o delta-nat.o
diff --git a/gdb/config/m68k/delta68.mt b/gdb/config/m68k/delta68.mt
index e69de29..1de2958 100644
--- a/gdb/config/m68k/delta68.mt
+++ b/gdb/config/m68k/delta68.mt
@@ -0,0 +1,3 @@
+# Motorola Delta Series sysV68 R3V7.1
+TDEPFILES= m68k-pinsn.o exec.o m68k-tdep.o
+TM_FILE= tm-delta.h
diff --git a/gdb/config/m68k/nm-delta68.h b/gdb/config/m68k/nm-delta68.h
index e69de29..040e962 100644
--- a/gdb/config/m68k/nm-delta68.h
+++ b/gdb/config/m68k/nm-delta68.h
@@ -0,0 +1,22 @@
+/* Macro definitions for a Delta.
+ Copyright (C) 1993 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* Motorola Delta Series sysV68 R3V7.1. */
+
+#define NO_PTRACE_H
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index e69de29..65694fc 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -0,0 +1,37 @@
+/* Target definitions for delta68.
+ Copyright 1993 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* Define BPT_VECTOR if it is different than the default.
+ This is the vector number used by traps to indicate a breakpoint. */
+
+#define BPT_VECTOR 0x1
+
+#undef CPLUS_MARKER
+#define CPLUS_MARKER '%'
+#define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
+#define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
+
+/* Amount PC must be decremented by after a breakpoint.
+ On the Delta, the kernel decrements it for us. */
+
+#define DECR_PC_AFTER_BREAK 0
+
+#define HAVE_68881
+
+#include "m68k/tm-m68k.h"
diff --git a/gdb/config/m68k/xm-delta68.h b/gdb/config/m68k/xm-delta68.h
index e69de29..38b5ed5 100644
--- a/gdb/config/m68k/xm-delta68.h
+++ b/gdb/config/m68k/xm-delta68.h
@@ -0,0 +1,36 @@
+/* Macro definitions for a Delta.
+ Copyright (C) 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define HOST_BYTE_ORDER BIG_ENDIAN
+
+/* I'm running gdb 4.9 under sysV68 R3V7.1.
+
+ On some machines, gdb crashes when it's starting up while calling the
+ vendor's termio tgetent() routine. It always works when run under
+ itself (actually, under 3.2, it's not an infinitely recursive bug.)
+ After some poking around, it appears that depending on the environment
+ size, or whether you're running YP, or the phase of the moon or something,
+ the stack is not always long-aligned when main() is called, and tgetent()
+ takes strong offense at that. On some machines this bug never appears, but
+ on those where it does, it occurs quite reliably. */
+#define ALIGN_STACK_ON_STARTUP
+
+#define USG
+
+#define HAVE_TERMIO
diff --git a/gdb/configure.in b/gdb/configure.in
index a5b9643..bfbce46 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -63,6 +63,7 @@ m68*-cbm-sysv4*) gdb_host=amix ;;
m68*-hp-bsd*) gdb_host=hp300bsd ;;
m68*-hp-hpux*) gdb_host=hp300hpux ;;
m68*-isi-*) gdb_host=isi ;;
+m68*-motorola-*) gdb_host=delta68 ;;
m68*-sony-*) gdb_host=news ;;
m68*-sun-sunos3*) gdb_host=sun3os3 ;;
m68*-sun-sunos4*) gdb_host=sun3os4 ;;
@@ -204,6 +205,7 @@ m68*-altos-*) gdb_target=altos ;;
m68*-att-*) gdb_target=3b1 ;;
m68*-ericsson-*) gdb_target=es1800 ;;
m68*-isi-*) gdb_target=isi ;;
+m68*-motorola-*) gdb_target=delta68 ;;
m68*-netx-*) gdb_target=vxworks68 ;;
m68*-sony-*) gdb_target=news ;;
m68*-tandem-*) gdb_target=st2000 ;;
diff --git a/gdb/delta68-nat.c b/gdb/delta68-nat.c
index e69de29..ed31e58 100644
--- a/gdb/delta68-nat.c
+++ b/gdb/delta68-nat.c
@@ -0,0 +1,56 @@
+#include "defs.h"
+#include <sys/signal.h> /* for MAXSIG in sys/user.h */
+#include <sys/types.h> /* for ushort in sys/dir.h */
+#include <sys/dir.h> /* for struct direct in sys/user.h */
+#include <sys/user.h>
+
+#include <nlist.h>
+
+#if !defined (offsetof)
+#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+#endif
+
+/* Return the address in the core dump or inferior of register REGNO.
+ BLOCKEND is the address of the end of the user structure. */
+
+unsigned int
+register_addr (regno, blockend)
+ int regno;
+ int blockend;
+{
+ static int sysv68reg[] =
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 15, 16 };
+
+ if (regno >= 0 && regno < sizeof(sysv68reg) / sizeof(sysv68reg[0]))
+ return blockend + sysv68reg[regno] * 4;
+ else if (regno < FPC_REGNUM)
+ return offsetof (struct user, u_fpu.regs.reg[regno - FP0_REGNUM]
+ else if (regno == FPC_REGNUM)
+ return offsetof (struct user, u_fpu.regs.control);
+ else if (regno == FPS_REGNUM)
+ return offsetof (struct user, u_fpu.regs.status);
+ else if (regno == FPI_REGNUM)
+ return offsetof (struct user, u_fpu.regs.iaddr);
+ else
+ {
+ fprintf (stderr, "\
+Internal error: invalid register number %d in REGISTER_U_ADDR\n",
+ regno);
+ return blockend;
+ }
+}
+
+CORE_ADDR kernel_u_addr;
+static struct nlist nl[] = {{ "_u", -1, }, { (char *) 0, }};
+
+/* Read the value of the u area from the kernel. */
+void _initialize_kernel_u_addr ()
+{
+ if (nlist ("/sysV68", nl) == 0)
+ kernel_u_addr = nl[0].n_value;
+ else
+ {
+ perror ("Cannot get kernel u area address");
+ exit (1);
+ }
+}