From 304977ab6f7e88eef8e5f7881fd0c1fa4d84a4a6 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Mon, 23 Aug 1993 21:14:31 +0000 Subject: [PATCH] * config/m88k/{delta88v4.mt,delta88v4.mh}: New files * config/m88k/delta88.mh: Fix comment. * config/m88k/tm-delta88.h: Remove unused BCS define. * config/m88k/{tm-delta88v4.h,xm-delta88v4.h,nm-delta88v4.h}: New files. * configure.in: Recognize m88*-motorola-sysv4*. * m88k-nat.c: Always include sys/types.h; don't depend on USG. --- gdb/ChangeLog | 14 +++++++-- gdb/config/m88k/delta88.mh | 2 +- gdb/config/m88k/delta88v4.mh | 12 +++++++ gdb/config/m88k/delta88v4.mt | 3 ++ gdb/config/m88k/nm-delta88v4.h | 21 +++++++++++++ gdb/config/m88k/tm-delta88.h | 5 --- gdb/config/m88k/tm-delta88v4.h | 23 ++++++++++++++ gdb/config/m88k/xm-delta88v4.h | 22 +++++++++++++ gdb/configure.in | 11 ++++--- gdb/m88k-nat.c | 57 ++++++++++++++++++++++++++++++++-- 10 files changed, 155 insertions(+), 15 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 33e4c7841d5..7df730565e5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,7 +1,17 @@ +Mon Aug 23 14:56:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * config/m88k/{delta88v4.mt,delta88v4.mh}: New files + * config/m88k/delta88.mh: Fix comment. + * config/m88k/tm-delta88.h: Remove unused BCS define. + * config/m88k/{tm-delta88v4.h,xm-delta88v4.h,nm-delta88v4.h}: + New files. + * configure.in: Recognize m88*-motorola-sysv4*. + * m88k-nat.c: Always include sys/types.h; don't depend on USG. + Mon Aug 23 12:57:42 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - * mipsread.c (parse_symbol, parse_type, cross_ref): Pass name of symbol - as an argument and use it in complaints. + * mipsread.c (parse_symbol, parse_type, cross_ref): Pass name of + symbol as an argument and use it in complaints. * symmisc.c (dump_psymtab): Dump filenames of dependencies. Mon Aug 23 1993 Sean Fagan (sef@cygnus.com) diff --git a/gdb/config/m88k/delta88.mh b/gdb/config/m88k/delta88.mh index ea51e5fcad3..40931430843 100644 --- a/gdb/config/m88k/delta88.mh +++ b/gdb/config/m88k/delta88.mh @@ -1,4 +1,4 @@ -# Host: Motorola 88000 running DGUX +# Host: Motorola 88k running SVR3 XDEPFILES= XM_FILE= xm-delta88.h NAT_FILE= nm-m88k.h diff --git a/gdb/config/m88k/delta88v4.mh b/gdb/config/m88k/delta88v4.mh index e69de29bb2d..5de1366df67 100644 --- a/gdb/config/m88k/delta88v4.mh +++ b/gdb/config/m88k/delta88v4.mh @@ -0,0 +1,12 @@ +# Host: Motorola 88k running SVR4 +XDEPFILES= +XM_FILE= xm-delta88v4.h +NAT_FILE= nm-delta88v4.h +NATDEPFILES= exec.o infptrace.o inftarg.o fork-child.o m88k-nat.o corelow.o \ + core-svr4.o procfs.o solib.o +REGEX=regex.o +REGEX1=regex.o +# Have to use /bin/nm because a bfd nm won't do the right thing +MUNCH_DEFINE=MUNCH_NM=/bin/nm +M_INSTALL=cp gdb.z $(ddestdir)/man/man1 +M_UNINSTALL = rm -f $(ddestdir)/man/man1 diff --git a/gdb/config/m88k/delta88v4.mt b/gdb/config/m88k/delta88v4.mt index e69de29bb2d..c241ae43b4d 100644 --- a/gdb/config/m88k/delta88v4.mt +++ b/gdb/config/m88k/delta88v4.mt @@ -0,0 +1,3 @@ +# Target: Motorola 88k running SVR4 +TDEPFILES= m88k-tdep.o m88k-pinsn.o +TM_FILE= tm-delta88v4.h diff --git a/gdb/config/m88k/nm-delta88v4.h b/gdb/config/m88k/nm-delta88v4.h index e69de29bb2d..2f707da6832 100644 --- a/gdb/config/m88k/nm-delta88v4.h +++ b/gdb/config/m88k/nm-delta88v4.h @@ -0,0 +1,21 @@ +/* Native machine description for Motorola Delta 88 box, for GDB. + Copyright 1986, 1987, 1988, 1989, 1990, 1991 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. */ + +#include "m88k/nm-m88k.h" +#include "nm-sysv4.h" diff --git a/gdb/config/m88k/tm-delta88.h b/gdb/config/m88k/tm-delta88.h index 513bbd35bf7..7ca46ddb665 100644 --- a/gdb/config/m88k/tm-delta88.h +++ b/gdb/config/m88k/tm-delta88.h @@ -19,9 +19,4 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m88k/tm-m88k.h" -/* BCS is a standard for binary compatibility. This machine uses it. */ -#if !defined (BCS) -#define BCS 1 -#endif - #define DELTA88 diff --git a/gdb/config/m88k/tm-delta88v4.h b/gdb/config/m88k/tm-delta88v4.h index e69de29bb2d..7dccb1176f8 100644 --- a/gdb/config/m88k/tm-delta88v4.h +++ b/gdb/config/m88k/tm-delta88v4.h @@ -0,0 +1,23 @@ +/* Target machine description for Motorola Delta 88 box, for GDB. + Copyright 1986, 1987, 1988, 1989, 1990, 1991 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 DELTA88 + +#include "m88k/tm-m88k.h" +#include "tm-sysv4.h" diff --git a/gdb/config/m88k/xm-delta88v4.h b/gdb/config/m88k/xm-delta88v4.h index e69de29bb2d..140ff041303 100644 --- a/gdb/config/m88k/xm-delta88v4.h +++ b/gdb/config/m88k/xm-delta88v4.h @@ -0,0 +1,22 @@ +/* Host machine description for Motorola Delta 88 box, for GDB. + Copyright 1986, 1987, 1988, 1989, 1990, 1991 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 + +#include "xm-sysv4.h" diff --git a/gdb/configure.in b/gdb/configure.in index 1a696338b28..46db11eb5b3 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -73,8 +73,10 @@ m68*-sun-sunos3*) gdb_host=sun3os3 ;; m68*-sun-sunos4*) gdb_host=sun3os4 ;; m68*-sun-*) gdb_host=sun3os4 ;; -m88k-motorola-*) gdb_host=delta88 ;; -m88k-*-*) gdb_host=m88k ;; +m88*-motorola-sysv4*) gdb_host=delta88v4 ;; +m88*-motorola-sysv*) gdb_host=delta88 ;; +# I suspect this is just used for DGUX +m88*-*-*) gdb_host=m88k ;; mips-dec-*) gdb_host=decstation ;; mips-little-*) gdb_host=littlemips ;; @@ -231,8 +233,9 @@ m68*-*-sunos3*) gdb_target=sun3os3 ;; m68*-*-sunos4*) gdb_target=sun3os4 ;; m68*-*-vxworks*) gdb_target=vxworks68 ;; -m88k-motorola-*) gdb_target=delta88 ;; -m88k-*-*) gdb_target=m88k ;; +m88*-motorola-svr4*) gdb_target=delta88r4 ;; +m88*-motorola-*) gdb_target=delta88 ;; +m88*-*-*) gdb_target=m88k ;; mips-big-*) gdb_target=bigmips ;; mips-dec-*) gdb_target=decstation ;; diff --git a/gdb/m88k-nat.c b/gdb/m88k-nat.c index 189c18df686..41cf84235f0 100644 --- a/gdb/m88k-nat.c +++ b/gdb/m88k-nat.c @@ -21,10 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "frame.h" #include "inferior.h" -#ifdef USG #include -#endif - #include #include #include @@ -223,3 +220,57 @@ m88k_register_u_addr (blockend, regnum) } } +#ifdef USE_PROC_FS + +#include + +/* Given a pointer to a general register set in /proc format (gregset_t *), + unpack the register contents and supply them as gdb's idea of the current + register values. */ + +void +supply_gregset (gregsetp) + gregset_t *gregsetp; +{ + register int regi; + register greg_t *regp = (greg_t *) gregsetp; + + for (regi=0; regi <= SP_REGNUM; regi++) + supply_register (regi, (char *) (regp + regi)); + + supply_register (SXIP_REGNUM, (char *) (regp + R_XIP)); + supply_register (SNIP_REGNUM, (char *) (regp + R_NIP)); + supply_register (SFIP_REGNUM, (char *) (regp + R_FIP)); + supply_register (PSR_REGNUM, (char *) (regp + R_PSR)); + supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR)); + supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR)); +} + +void +fill_gregset (gregsetp, regno) + gregset_t *gregsetp; + int regno; +{ + int regi; + register greg_t *regp = (greg_t *) gregsetp; + extern char registers[]; + + for (regi = 0 ; regi < R_R31 ; regi++) + if ((regno == -1) || (regno == regi)) + *(regp + regi) = *(int *) ®isters[REGISTER_BYTE(regi)]; + + if ((regno == -1) || (regno == SXIP_REGNUM)) + *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE(SXIP_REGNUM)]; + if ((regno == -1) || (regno == SNIP_REGNUM)) + *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE(SNIP_REGNUM)]; + if ((regno == -1) || (regno == SFIP_REGNUM)) + *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE(PSR_REGNUM)]; + if ((regno == -1) || (regno == PSR_REGNUM)) + *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE(PSR_REGNUM)]; + if ((regno == -1) || (regno == FPSR_REGNUM)) + *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE(FPSR_REGNUM)]; + if ((regno == -1) || (regno == FPCR_REGNUM)) + *(regp + R_FPCR) = *(int *) ®isters[REGISTER_BYTE(FPCR_REGNUM)]; +} + +#endif /* USE_PROC_FS */ -- 2.30.2