From 827f338d26249fc3e9e8798baa7f50c922c6875f Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 4 May 2004 23:47:15 +0000 Subject: [PATCH] * m68knbsd-nat.c: Remove file. * m68knbsd-tdep.c: Remove file. * Makefile.in: (m68knbsd-nat.o, m68knbsd-tdep.o): Remove dependencies. * configure.host: Add m68k-*-netbsdelf*. * configure.tgt (m68k-*-netbsd*): Set gdb_target to nbsd. * config/m68k/nbsdaout.mh (NATDEPFILES): Add m68kbsd-nat.o, solib.o and solib-sunos.o. Remove m68knbsd-nat.o, corelow.o. (XM_FILE): Remove. * config/m68k/nbsdelf.mh: New file. * config/m68k/nbsd.mt: New file. * config/m68k/nbsdaout.mt: Remove file. * config/m68k/tm-nbsd.h: Don't include , and "m68k/tm-m68k.h". Include "solib.h". (BPT_VECTOR, STACK_END_ADDR): Remove defines. (DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Likewise. (use_struct_convention): Remove prototype. (USE_STRUCT_CONVENTION): Remove define. * config/m68k/xm-nbsd.h: Remove file. --- gdb/ChangeLog | 22 ++++++++ gdb/Makefile.in | 3 -- gdb/config/m68k/nbsd.mt | 3 ++ gdb/config/m68k/nbsdaout.mh | 5 +- gdb/config/m68k/nbsdaout.mt | 3 -- gdb/config/m68k/nbsdelf.mh | 3 ++ gdb/config/m68k/tm-nbsd.h | 28 ++-------- gdb/config/m68k/xm-nbsd.h | 22 -------- gdb/configure.host | 1 + gdb/configure.tgt | 2 +- gdb/m68knbsd-nat.c | 103 ------------------------------------ gdb/m68knbsd-tdep.c | 33 ------------ 12 files changed, 35 insertions(+), 193 deletions(-) create mode 100644 gdb/config/m68k/nbsd.mt delete mode 100644 gdb/config/m68k/nbsdaout.mt create mode 100644 gdb/config/m68k/nbsdelf.mh delete mode 100644 gdb/config/m68k/xm-nbsd.h delete mode 100644 gdb/m68knbsd-nat.c delete mode 100644 gdb/m68knbsd-tdep.c diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d8b072e9820..9dc0962525b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,25 @@ +2004-05-01 Mark Kettenis + + * m68knbsd-nat.c: Remove file. + * m68knbsd-tdep.c: Remove file. + * Makefile.in: (m68knbsd-nat.o, m68knbsd-tdep.o): Remove + dependencies. + * configure.host: Add m68k-*-netbsdelf*. + * configure.tgt (m68k-*-netbsd*): Set gdb_target to nbsd. + * config/m68k/nbsdaout.mh (NATDEPFILES): Add m68kbsd-nat.o, + solib.o and solib-sunos.o. Remove m68knbsd-nat.o, corelow.o. + (XM_FILE): Remove. + * config/m68k/nbsdelf.mh: New file. + * config/m68k/nbsd.mt: New file. + * config/m68k/nbsdaout.mt: Remove file. + * config/m68k/tm-nbsd.h: Don't include , + and "m68k/tm-m68k.h". Include "solib.h". + (BPT_VECTOR, STACK_END_ADDR): Remove defines. + (DEPRECATED_SIGTRAMP_START, DEPRECATED_SIGTRAMP_END): Likewise. + (use_struct_convention): Remove prototype. + (USE_STRUCT_CONVENTION): Remove define. + * config/m68k/xm-nbsd.h: Remove file. + 2004-05-04 Michael Snyder * m68k-tdep.c (m68k_gdbarch_init): Default to using diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 6930e1330a1..ba6f75e52e1 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2018,9 +2018,6 @@ m68kbsd-nat.o: m68kbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ m68kbsd-tdep.o: m68kbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ $(regcache_h) $(regset_h) $(gdb_assert_h) $(gdb_string_h) \ $(m68k_tdep_h) $(solib_svr4_h) -m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ - $(regcache_h) -m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h) m68k-stub.o: m68k-stub.c m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \ $(frame_base_h) $(frame_unwind_h) $(floatformat_h) $(symtab_h)\ diff --git a/gdb/config/m68k/nbsd.mt b/gdb/config/m68k/nbsd.mt new file mode 100644 index 00000000000..1c77253243a --- /dev/null +++ b/gdb/config/m68k/nbsd.mt @@ -0,0 +1,3 @@ +# Target: NetBSD/m68k +TDEPFILES= m68k-tdep.o m68kbsd-tdep.o corelow.o solib.o solib-svr4.o +TM_FILE= tm-nbsd.h diff --git a/gdb/config/m68k/nbsdaout.mh b/gdb/config/m68k/nbsdaout.mh index 7ce279b332e..90a43d70b68 100644 --- a/gdb/config/m68k/nbsdaout.mh +++ b/gdb/config/m68k/nbsdaout.mh @@ -1,5 +1,4 @@ -# Host: Motorola m68k running NetBSD -NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o m68knbsd-nat.o \ +# Host: NetBSD/m68k a.out +NATDEPFILES= m68kbsd-nat.o fork-child.o infptrace.o inftarg.o \ solib.o solib-sunos.o -XM_FILE= xm-nbsd.h NAT_FILE= nm-nbsdaout.h diff --git a/gdb/config/m68k/nbsdaout.mt b/gdb/config/m68k/nbsdaout.mt deleted file mode 100644 index b6ac5a000e1..00000000000 --- a/gdb/config/m68k/nbsdaout.mt +++ /dev/null @@ -1,3 +0,0 @@ -# Target: Motorola m68k running NetBSD -TDEPFILES= m68k-tdep.o m68knbsd-tdep.o -TM_FILE= tm-nbsd.h diff --git a/gdb/config/m68k/nbsdelf.mh b/gdb/config/m68k/nbsdelf.mh new file mode 100644 index 00000000000..d15e1323647 --- /dev/null +++ b/gdb/config/m68k/nbsdelf.mh @@ -0,0 +1,3 @@ +# Host: NetBSD/m68k ELF +NATDEPFILES= m68kbsd-nat.o fork-child.o infptrace.o inftarg.o +NAT_FILE= nm-nbsd.h diff --git a/gdb/config/m68k/tm-nbsd.h b/gdb/config/m68k/tm-nbsd.h index 04a52723861..6215cf62ce9 100644 --- a/gdb/config/m68k/tm-nbsd.h +++ b/gdb/config/m68k/tm-nbsd.h @@ -1,4 +1,4 @@ -/* Macro definitions for m68k running under NetBSD. +/* Target-dependent definitions for NetBSD/m68k. Copyright 1994, 1996, 2001, 2004 Free Software Foundation, Inc. @@ -22,28 +22,6 @@ #ifndef TM_NBSD_H #define TM_NBSD_H -#include -#include +#include "solib.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 0xf - -/* Address of end of stack space. */ -#define STACK_END_ADDR USRSTACK - -/* For NetBSD, sigtramp is 32 bytes before STACK_END_ADDR. */ -#define DEPRECATED_IN_SIGTRAMP(PC,FUNC_NAME) \ -((PC) >= (STACK_END_ADDR - 32) && (PC) < (STACK_END_ADDR)) - -#include "m68k/tm-m68k.h" - -/* Return non-zero if we are in a shared library trampoline code stub. */ -#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \ - (name && !strcmp(name, "_DYNAMIC")) - -extern use_struct_convention_fn m68knbsd_use_struct_convention; -#define USE_STRUCT_CONVENTION(gcc_p, type) \ - m68knbsd_use_struct_convention(gcc_p, type) - -#endif /* TM_NBSD_H */ +#endif /* tm-nbsd.h */ diff --git a/gdb/config/m68k/xm-nbsd.h b/gdb/config/m68k/xm-nbsd.h deleted file mode 100644 index 6c735fa1a8c..00000000000 --- a/gdb/config/m68k/xm-nbsd.h +++ /dev/null @@ -1,22 +0,0 @@ -/* 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 "config/xm-nbsd.h" diff --git a/gdb/configure.host b/gdb/configure.host index 831e7861afe..46e5fcc5416 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -84,6 +84,7 @@ ia64-*-aix*) gdb_host=aix ;; ia64-*-linux*) gdb_host=linux ;; m68*-*-linux*) gdb_host=linux ;; +m68*-*-netbsdelf*) gdb_host=nbsdelf ;; m68*-*-netbsd*) gdb_host=nbsdaout ;; m68*-*-openbsd*) gdb_host=obsd ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 5e6e85e0455..be49f56ff3f 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -113,7 +113,7 @@ m68*-*-elf*) gdb_target=monitor ;; m68*-*-linux*) gdb_target=linux build_gdbserver=yes ;; -m68*-*-netbsd*) gdb_target=nbsdaout ;; +m68*-*-netbsd*) gdb_target=nbsd ;; m68*-*-openbsd*) gdb_target=obsd ;; m68*-*-os68k*) gdb_target=os68k ;; m68*-*-uclinux*) gdb_target=monitor ;; diff --git a/gdb/m68knbsd-nat.c b/gdb/m68knbsd-nat.c deleted file mode 100644 index c4379691ce0..00000000000 --- a/gdb/m68knbsd-nat.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Native-dependent code for Motorola m68k's running NetBSD, for GDB. - Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001 - 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 "defs.h" -#include -#include -#include -#include -#include "inferior.h" -#include "gdbcore.h" -#include "regcache.h" - -void -fetch_inferior_registers (int regno) -{ - struct reg inferior_registers; - struct fpreg inferior_fp_registers; - - ptrace (PT_GETREGS, PIDGET (inferior_ptid), - (PTRACE_ARG3_TYPE) & inferior_registers, 0); - memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (0)], &inferior_registers, - sizeof (inferior_registers)); - - ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), - (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0); - memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers, - sizeof (inferior_fp_registers)); - - deprecated_registers_fetched (); -} - -void -store_inferior_registers (int regno) -{ - struct reg inferior_registers; - struct fpreg inferior_fp_registers; - - memcpy (&inferior_registers, &deprecated_registers[DEPRECATED_REGISTER_BYTE (0)], - sizeof (inferior_registers)); - ptrace (PT_SETREGS, PIDGET (inferior_ptid), - (PTRACE_ARG3_TYPE) & inferior_registers, 0); - - memcpy (&inferior_fp_registers, &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], - sizeof (inferior_fp_registers)); - ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), - (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0); -} - -struct md_core -{ - struct reg intreg; - struct fpreg freg; -}; - -static void -fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, - CORE_ADDR ignore) -{ - struct md_core *core_reg = (struct md_core *) core_reg_sect; - - /* Integer registers */ - memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (0)], - &core_reg->intreg, sizeof (struct reg)); - /* Floating point registers */ - memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], - &core_reg->freg, sizeof (struct fpreg)); -} - -/* Register that we are able to handle m68knbsd core file formats. - FIXME: is this really bfd_target_unknown_flavour? */ - -static struct core_fns m68knbsd_core_fns = -{ - bfd_target_unknown_flavour, /* core_flavour */ - default_check_format, /* check_format */ - default_core_sniffer, /* core_sniffer */ - fetch_core_registers, /* core_read_registers */ - NULL /* next */ -}; - -void -_initialize_m68knbsd_nat (void) -{ - deprecated_add_core_fns (&m68knbsd_core_fns); -} diff --git a/gdb/m68knbsd-tdep.c b/gdb/m68knbsd-tdep.c deleted file mode 100644 index 520d14fa47f..00000000000 --- a/gdb/m68knbsd-tdep.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Target-dependent code for NetBSD/i386, for GDB. - Copyright 1988, 1989, 1991, 1992, 1994, 1996, 2000, 2001 - 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 "defs.h" -#include "gdbtypes.h" -#include "regcache.h" - -int -m68knbsd_use_struct_convention (int gcc_p, struct type *type) -{ - return !(TYPE_LENGTH (type) == 1 - || TYPE_LENGTH (type) == 2 - || TYPE_LENGTH (type) == 4 - || TYPE_LENGTH (type) == 8); -} -- 2.30.2