* config/m68k/{nbsd.mh,nbsd.mt,nm-nbsd.h,tm-nbsd.h,xm-nbsd.h},

m68knbsd-nat.c: New files, support for NetBSD/m68k.

* configure.in (m68k-*-netbsd*): New config.
* configure: Regenerated.
This commit is contained in:
J.T. Conklin 1996-02-22 09:11:16 +00:00
parent 6a6a552a29
commit b7f3b6d5e6
10 changed files with 183 additions and 2 deletions

View File

@ -232,6 +232,7 @@ m2-valprint.c
m3-nat.c
m68k-stub.c
m68k-tdep.c
m68knbsd-nat.c
m88k-nat.c
m88k-tdep.c
mac-defs.h

View File

@ -1,3 +1,11 @@
Thu Feb 22 00:52:42 1996 J.T. Conklin <jtc@rtl.cygnus.com>
* config/m68k/{nbsd.mh,nbsd.mt,nm-nbsd.h,tm-nbsd.h,xm-nbsd.h},
m68knbsd-nat.c: New files, support for NetBSD/m68k.
* configure.in (m68k-*-netbsd*): New config.
* configure: Regenerated.
Wed Feb 21 19:00:21 1996 Fred Fish <fnf@ninemoons.com>
* standalone.c (open, _initialize_standalone): Fix obvious typos

View File

@ -47,6 +47,8 @@ m68klynx.mt
m68kv4.mh
m68kv4.mt
monitor.mt
nbsd.mh
nbsd.mt
news.mh
news.mt
news1000.mh
@ -57,6 +59,7 @@ nm-dpx2.h
nm-hp300bsd.h
nm-hp300hpux.h
nm-m68klynx.h
nm-nbsd.h
nm-news.h
nm-sun2.h
nm-sun3.h
@ -86,6 +89,7 @@ tm-isi.h
tm-m68kv4.h
tm-mac.h
tm-monitor.h
tm-nbsd.h
tm-news.h
tm-os68k.h
tm-st2000.h

5
gdb/config/m68k/nbsd.mh Normal file
View File

@ -0,0 +1,5 @@
# Host: Motorola m68k running NetBSD
XDEPFILES=
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o m68knbsd-nat.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h

21
gdb/config/m68k/nm-nbsd.h Normal file
View File

@ -0,0 +1,21 @@
/* Native-dependent definitions for Motorola m68k running NetBSD, for GDB.
Copyright 1996 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Get generic NetBSD native definitions. */
#include "nm-nbsd.h"

41
gdb/config/m68k/tm-nbsd.h Normal file
View File

@ -0,0 +1,41 @@
/* Macro definitions for i386 running under NetBSD.
Copyright 1994 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef TM_NBSD_H
#define TM_NBSD_H
#include <sys/param.h>
#include <machine/vmparam.h>
/* 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 0x2
/* Address of end of stack space. */
#define STACK_END_ADDR USRSTACK
/* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */
#define SIGTRAMP_START (STACK_END_ADDR - 32)
#define SIGTRAMP_END (STACK_END_ADDR)
#include "m68k/tm-m68k.h"
#include "tm-nbsd.h"
#endif /* TM_NBSD_H */

21
gdb/config/m68k/xm-nbsd.h Normal file
View File

@ -0,0 +1,21 @@
/* Parameters for execution on a Motorola m68k running NetBSD, for GDB.
Copyright 1996 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Get generic NetBSD host definitions. */
#include "xm-nbsd.h"

5
gdb/configure vendored
View File

@ -1139,7 +1139,7 @@ EOF
fi
for ac_hdr in memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h
for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2922,6 +2922,7 @@ m68*-hp-bsd*) gdb_host=hp300bsd ;;
m68*-hp-hpux*) gdb_host=hp300hpux ;;
m68*-isi-*) gdb_host=isi ;;
m68*-*-lynxos*) gdb_host=m68klynx ;;
m68*-*-netbsd*) gdb_host=nbsd ;;
m68*-*-sysv4*) gdb_host=m68kv4 ;;
m68*-motorola-*) gdb_host=delta68 ;;
m68*-sony-*) gdb_host=news ;;
@ -3108,6 +3109,7 @@ m68*-*-coff*) gdb_target=monitor ;;
m68*-*-elf*) gdb_target=monitor ;;
m68*-*-lynxos*) gdb_target=m68klynx
configdirs="${configdirs} gdbserver" ;;
m68*-*-netbsd*) gdb_target=nbsd ;;
m68*-*-os68k*) gdb_target=os68k ;;
m68*-*-sunos3*) gdb_target=sun3os3 ;;
m68*-*-sunos4*) gdb_target=sun3os4 ;;
@ -3695,3 +3697,4 @@ fi
exit 0

View File

@ -36,7 +36,7 @@ AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AC_HEADER_STDC
AC_CHECK_HEADERS(memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h)
AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h)
AC_HEADER_STAT
AC_MSG_CHECKING([for gregset_t type])
@ -316,6 +316,7 @@ m68*-hp-bsd*) gdb_host=hp300bsd ;;
m68*-hp-hpux*) gdb_host=hp300hpux ;;
m68*-isi-*) gdb_host=isi ;;
m68*-*-lynxos*) gdb_host=m68klynx ;;
m68*-*-netbsd*) gdb_host=nbsd ;;
m68*-*-sysv4*) gdb_host=m68kv4 ;;
m68*-motorola-*) gdb_host=delta68 ;;
m68*-sony-*) gdb_host=news ;;
@ -502,6 +503,7 @@ m68*-*-coff*) gdb_target=monitor ;;
m68*-*-elf*) gdb_target=monitor ;;
m68*-*-lynxos*) gdb_target=m68klynx
configdirs="${configdirs} gdbserver" ;;
m68*-*-netbsd*) gdb_target=nbsd ;;
m68*-*-os68k*) gdb_target=os68k ;;
m68*-*-sunos3*) gdb_target=sun3os3 ;;
m68*-*-sunos4*) gdb_target=sun3os4 ;;
@ -715,3 +717,4 @@ nativefile=$nativefile
])
exit 0

74
gdb/m68knbsd-nat.c Normal file
View File

@ -0,0 +1,74 @@
/* Native-dependent code for Motorola m68k's running NetBSD, for GDB.
Copyright 1988, 1989, 1991, 1992, 1994, 1996 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
#include <machine/frame.h>
#include "defs.h"
#include "inferior.h"
void
fetch_inferior_registers(regno)
int regno;
{
struct reg inferior_registers;
struct fpreg inferior_fp_registers;
ptrace (PT_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
sizeof(inferior_registers));
ptrace (PT_GETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
sizeof(inferior_fp_registers));
registers_fetched ();
}
void
store_inferior_registers(regno)
int regno;
{
struct reg inferior_registers;
struct fpreg inferior_fp_registers;
memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)],
sizeof(inferior_registers));
ptrace (PT_SETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof(inferior_fp_registers));
ptrace (PT_SETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
}
void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
char *core_reg_sect;
unsigned core_reg_size;
int which;
unsigned int ignore;
{
abort();
}