From: J.T. Conklin Date: Thu, 1 Sep 1994 18:20:42 +0000 (+0000) Subject: * config/tm-nbsd.h: New file, support for all NetBSD targets. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46cf56faf154401f89c72e62a4127eba1240d456;p=binutils-gdb.git * config/tm-nbsd.h: New file, support for all NetBSD targets. * config/xm-nbsd.h: fix typo. * config/sparc/{nm,tm,xm}-nbsd.h: New files, renamed from {nm,tm,xm}-sparcnbsd.h to conform to prefered file naming conventions. * configure.in: (sparc-*-netbsd): use config/sparc/nbsd.m[ht]. --- diff --git a/gdb/config/.Sanitize b/gdb/config/.Sanitize index b0958a3de4d..c6175fa46f5 100644 --- a/gdb/config/.Sanitize +++ b/gdb/config/.Sanitize @@ -49,6 +49,7 @@ sh sparc tahoe tm-lynx.h +tm-nbsd.h tm-sunos.h tm-sysv4.h vax diff --git a/gdb/config/sparc/.Sanitize b/gdb/config/sparc/.Sanitize index 10fd62163f5..efb3b34b3fe 100644 --- a/gdb/config/sparc/.Sanitize +++ b/gdb/config/sparc/.Sanitize @@ -23,8 +23,10 @@ Do-first: Things-to-keep: +nbsd.mh +nbsd.mt +nm-nbsd.h nm-sparclynx.h -nm-sparcnbsd.h nm-sun4os4.h sp64.mt sp64sim.mt @@ -32,26 +34,24 @@ sparc-em.mt sparclite.mt sparclynx.mh sparclynx.mt -sparcnbsd.mh -sparcnbsd.mt sun4os4.mh sun4os4.mt sun4sol2.mh sun4sol2.mt +tm-nbsd.h tm-sp64.h tm-sp64sim.h tm-sparc.h tm-sparclite.h tm-sparclynx.h -tm-sparcnbsd.h tm-spc-em.h tm-sun4os4.h tm-sun4sol2.h tm-vxsparc.h vxsparc.mt +xm-nbsd.h xm-sparc.h xm-sparclynx.h -xm-sparcnbsd.h xm-sun4os4.h xm-sun4sol2.h diff --git a/gdb/config/sparc/nbsd.mh b/gdb/config/sparc/nbsd.mh new file mode 100644 index 00000000000..310838d6acf --- /dev/null +++ b/gdb/config/sparc/nbsd.mh @@ -0,0 +1,6 @@ +# Host: Sun 4 or Sparcstation, running NetBSD +XDEPFILES= ser-tcp.o +XM_FILE= xm-nbsd.h +NAT_FILE= nm-nbsd.h +NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o +HOST_IPC=-DBSD_IPC diff --git a/gdb/config/sparc/nm-nbsd.h b/gdb/config/sparc/nm-nbsd.h new file mode 100644 index 00000000000..83d918e4182 --- /dev/null +++ b/gdb/config/sparc/nm-nbsd.h @@ -0,0 +1,35 @@ +/* Native-dependent definitions for Sparc running NetBSD, for GDB. + Copyright 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. */ + +#ifndef NM_NBSD_H +#define NM_NBSD_H + +/* This is the amount to subtract from u.u_ar0 + to get the offset in the core file of the register values. */ + +#include +#define KERNEL_U_ADDR USRSTACK + +#define PTRACE_ARG3_TYPE char* + +#define ATTACH_DETACH + +#define FETCH_INFERIOR_REGISTERS + +#endif /* NM_NBSD_H */ diff --git a/gdb/config/sparc/tm-nbsd.h b/gdb/config/sparc/tm-nbsd.h new file mode 100644 index 00000000000..5b4ee332a9c --- /dev/null +++ b/gdb/config/sparc/tm-nbsd.h @@ -0,0 +1,26 @@ +/* Macro definitions for Sparc 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef TM_NBSD_H +#define TM_NBSD_H + +#include "sparc/tm-sparc.h" +#include "tm-nbsd.h" + +#endif /* TM_NBSD_H */ diff --git a/gdb/config/sparc/xm-nbsd.h b/gdb/config/sparc/xm-nbsd.h new file mode 100644 index 00000000000..39f0f6bef05 --- /dev/null +++ b/gdb/config/sparc/xm-nbsd.h @@ -0,0 +1,24 @@ +/* Parameters for execution on a Sparc running NetBSD, for GDB. + 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* Get generic NetBSD host definitions. */ +#include "xm-nbsd.h" + +/* Before storing, we need to read all the registers. */ +#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES) diff --git a/gdb/config/tm-nbsd.h b/gdb/config/tm-nbsd.h new file mode 100644 index 00000000000..3eb7a4ce221 --- /dev/null +++ b/gdb/config/tm-nbsd.h @@ -0,0 +1,74 @@ +/* Target machine sub-description for NetBSD. + This is included by other tm-*.h files to specify NetBSD-specific stuff. + Copyright 1993, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include "solib.h" /* Support for shared libraries. */ + +/* make structure definitions match up with those expected in solib.c */ +#define link_object sod +#define lo_name sod_name +#define lo_library sod_library +#define lo_unused sod_reserved +#define lo_major sod_major +#define lo_minor sod_minor +#define lo_next sod_next + +#define link_map so_map +#define lm_addr som_addr +#define lm_name som_path +#define lm_next som_next +#define lm_lop som_sod +#define lm_lob som_sodbase +#define lm_rwt som_write +#define lm_ld som_dynamic +#define lm_lpd som_spd + +#define link_dynamic_2 section_dispatch_table +#define ld_loaded sdt_loaded +#define ld_need sdt_sods +#define ld_rules sdt_filler1 +#define ld_got sdt_got +#define ld_plt sdt_plt +#define ld_rel sdt_rel +#define ld_hash sdt_hash +#define ld_stab sdt_nzlist +#define ld_stab_hash sdt_filler2 +#define ld_buckets sdt_buckets +#define ld_symbols sdt_strings +#define ld_symb_size sdt_str_sz +#define ld_text sdt_text_sz +#define ld_plt_sz sdt_plt_sz + +#define rtc_symb rt_symbol +#define rtc_sp rt_sp +#define rtc_next rt_next + +#define ld_debug so_debug +#define ldd_version dd_version +#define ldd_in_debugger dd_in_debugger +#define ldd_sym_loaded dd_sym_loaded +#define ldd_bp_addr dd_bpt_addr +#define ldd_bp_inst dd_bpt_shadow +#define ldd_cp dd_cc + +#define link_dynamic _dynamic +#define ld_version d_version +#define ldd d_debug +#define ld_un d_un +#define ld_2 d_sdt diff --git a/gdb/config/xm-nbsd.h b/gdb/config/xm-nbsd.h index a0e2e847112..d00f2c53f2e 100644 --- a/gdb/config/xm-nbsd.h +++ b/gdb/config/xm-nbsd.h @@ -17,11 +17,12 @@ 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. */ -/* for INT_MIN, to avoid "INT_MIN redefined" warnings from defs.h */ +/* We have to include these files now, so that GDB will not make + competing definitions in defs.h. */ #include #include -#ifdef BYTE_ORDER == BIG_ENDIAN +#if BYTE_ORDER == BIG_ENDIAN #define HOST_BYTE_ORDER BIG_ENDIAN #else #define HOST_BYTE_ORDER LITTLE_ENDIAN