From: "David O'Brien" <obrien@FreeBSD.org>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] add FreeBSD/sparc64 support
Date: Fri, 01 Mar 2002 10:37:00 -0000 [thread overview]
Message-ID: <20020301103420.A30414@dragon.nuxi.com> (raw)
This was checked in.
2002-03-01 David O'Brien <obrien@FreeBSD.org>
* configure.host (sparc64-*-freebsd): Add.
* configure.tgt: Likewise.
* config/sparc/fbsd.mh: New file.
* config/sparc/fbsd.mt: Likewise.
* config/sparc/nm-fbsd.h: Likewise.
* config/sparc/tm-fbsd.h: Likewise.
Index: configure.host
===================================================================
RCS file: /cvs/src/src/gdb/configure.host,v
retrieving revision 1.33
diff -u -r1.33 configure.host
--- configure.host 2002/01/24 02:48:04 1.33
+++ configure.host 2002/03/01 18:22:23
@@ -144,6 +144,8 @@
sparc-*-sunos4*) gdb_host=sun4os4 ;;
sparc-*-sunos5*) gdb_host=sun4sol2 ;;
sparc-*-*) gdb_host=sun4os4 ;;
+sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
+ gdb_host=fbsd ;;
sparc64-*-linux*) gdb_host=linux ;;
sparcv9-*-* | sparc64-*-*) gdb_host=sun4sol2 ;;
Index: configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.55
diff -u -r1.55 configure.tgt
--- configure.tgt 2002/02/28 16:58:12 1.55
+++ configure.tgt 2002/03/01 18:22:23
@@ -276,6 +276,8 @@
# regs (some of which are usable in v8plus) so sp64sol.mt hasn't been
# deleted though presumably it should be eventually.
#sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
+sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
+ gdb_target=fbsd ;;
sparc64-*-linux*) gdb_target=sp64linux ;;
sparcv9-*-* | sparc64-*-*) gdb_target=sp64 ;;
Index: config/sparc/fbsd.mh
===================================================================
RCS file: fbsd.mh
diff -N fbsd.mh
--- /dev/null Tue May 5 13:32:27 1998
+++ fbsd.mh Fri Mar 1 10:22:23 2002
@@ -0,0 +1,25 @@
+/* Host-dependent settings for FreeBSD/sparc64.
+ Copyright 2002 Free Software Foundation, Inc.
+ Contributed by David E. O'Brien <obrien@FreeBSD.org>.
+
+ 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. */
+
+# Host: FreeBSD/sparc64
+NATDEPFILES= sparc-nat.o \
+ corelow.o fork-child.o infptrace.o inftarg.o \
+ solib.o solib-svr4.o solib-legacy.o
+NAT_FILE= nm-fbsd.h
Index: config/sparc/fbsd.mt
===================================================================
RCS file: fbsd.mt
diff -N fbsd.mt
--- /dev/null Tue May 5 13:32:27 1998
+++ fbsd.mt Fri Mar 1 10:22:23 2002
@@ -0,0 +1,23 @@
+/* Target-dependent settings for FreeBSD/sparc64.
+ Copyright 2002 Free Software Foundation, Inc.
+ Contributed by David E. O'Brien <obrien@FreeBSD.org>.
+
+ 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. */
+
+# Target: FreeBSD/sparc64
+TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
+TM_FILE= tm-fbsd.h
Index: config/sparc/nm-fbsd.h
===================================================================
RCS file: nm-fbsd.h
diff -N nm-fbsd.h
--- /dev/null Tue May 5 13:32:27 1998
+++ nm-fbsd.h Fri Mar 1 10:22:23 2002
@@ -0,0 +1,67 @@
+/* Native-dependent definitions for FreeBSD/sparc64.
+ Copyright 2002
+ Free Software Foundation, Inc.
+ Contributed by David E. O'Brien <obrien@FreeBSD.org>.
+
+ 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_FBSD_H
+#define NM_FBSD_H
+
+/* Type of the third argument to the `ptrace' system call. */
+#define PTRACE_ARG3_TYPE caddr_t
+
+/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
+#define FETCH_INFERIOR_REGISTERS
+
+/* We can attach and detach. */
+#define ATTACH_DETACH
+\f
+
+/* Shared library support. */
+
+#define SVR4_SHARED_LIBS
+
+#include "solib.h" /* Support for shared libraries. */
+#include "elf/common.h" /* Additional ELF shared library info. */
+
+/* Make things match up with what is expected in sparc-nat.c. */
+
+#define PTRACE_GETREGS PT_GETREGS
+#define PTRACE_SETREGS PT_SETREGS
+#define PTRACE_GETFPREGS PT_GETFPREGS
+#define PTRACE_SETFPREGS PT_SETFPREGS
+
+#define GDB_GREGSET_T struct reg
+#define GDB_FPREGSET_T struct fpreg
+
+#define regs trapframe
+#define r_g1 tf_global[1]
+#define r_ps tf_tstate
+#define r_pc tf_tpc
+#define r_npc tf_tnpc
+#define r_y tf_y
+
+#define FPU_FSR_TYPE unsigned long
+#define fp_status fpreg /* our reg.h */
+#define fpu fpreg /* our reg.h */
+#define fpu_regs fr_regs /* one field of fpu_fr on Solaris */
+#define fpu_fr fr_regs /* a union w/in struct fpu on Solaris */
+#define fpu_fsr fr_fsr
+#define Fpu_fsr fr_fsr
+
+#endif /* NM_FBSD_H */
Index: config/sparc/tm-fbsd.h
===================================================================
RCS file: tm-fbsd.h
diff -N tm-fbsd.h
--- /dev/null Tue May 5 13:32:27 1998
+++ tm-fbsd.h Fri Mar 1 10:22:23 2002
@@ -0,0 +1,34 @@
+/* Target-dependent definitions for FreeBSD/sparc64.
+ Copyright 2002 Free Software Foundation, Inc.
+ Contributed by David E. O'Brien <obrien@FreeBSD.org>.
+
+ 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_FBSD_H
+#define TM_FBSD_H
+
+#define SVR4_SHARED_LIBS
+#include "solib.h" /* Support for shared libraries. */
+#include "sparc/tm-sp64.h"
+
+/* Number of traps that happen between exec'ing the shell to run an
+ inferior, and when we finally get to the inferior code. The
+ default is right for FreeBSD. */
+
+#undef START_INFERIOR_TRAPS_EXPECTED
+
+#endif /* TM_FBSD_H */
next reply other threads:[~2002-03-01 18:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-01 10:37 David O'Brien [this message]
2002-03-03 3:29 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020301103420.A30414@dragon.nuxi.com \
--to=obrien@freebsd.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox