* configure.in, config/m68k/*delta68*, delta68-nat.c: New port.

This commit is contained in:
Jim Kingdon 1993-07-02 19:18:14 +00:00
parent a44cce7647
commit c649a7c231
7 changed files with 162 additions and 0 deletions

View file

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

View file

@ -0,0 +1,3 @@
# Motorola Delta Series sysV68 R3V7.1
TDEPFILES= m68k-pinsn.o exec.o m68k-tdep.o
TM_FILE= tm-delta.h

View file

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

View file

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

View file

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

View file

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

View file

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