* 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 <sys/param.h>,
<machine/vmparam.h> 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.
This commit is contained in:
Mark Kettenis 2004-05-04 23:47:15 +00:00
parent 619874a6bd
commit 827f338d26
12 changed files with 35 additions and 193 deletions

View file

@ -1,3 +1,25 @@
2004-05-01 Mark Kettenis <kettenis@gnu.org>
* 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 <sys/param.h>,
<machine/vmparam.h> 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 <msnyder@redhat.com>
* m68k-tdep.c (m68k_gdbarch_init): Default to using

View file

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

3
gdb/config/m68k/nbsd.mt Normal file
View file

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

View file

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

View file

@ -1,3 +0,0 @@
# Target: Motorola m68k running NetBSD
TDEPFILES= m68k-tdep.o m68knbsd-tdep.o
TM_FILE= tm-nbsd.h

View file

@ -0,0 +1,3 @@
# Host: NetBSD/m68k ELF
NATDEPFILES= m68kbsd-nat.o fork-child.o infptrace.o inftarg.o
NAT_FILE= nm-nbsd.h

View file

@ -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 <sys/param.h>
#include <machine/vmparam.h>
#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 */

View file

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

View file

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

View file

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

View file

@ -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 <sys/types.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
#include <machine/frame.h>
#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);
}

View file

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