• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiónbd37273160f1691c00eab2b3d7272a108619ebac (tree)
Tiempo2006-12-16 08:57:35
AutorMark Kettenis <kettenis@gnu....>
CommiterMark Kettenis

Log Message

Add OpenBSD/sh native support.
* NEWS (New native configurations): Mention OpenBSD/sh.
* configure.host: Add sh*-*-openbsd*.
* shnbsd-nat.c: Include "inf-ptrace.h".
(shnbsd_fetch_inferior_registers): Rename from
fetch_inferior_registers. Make static.
(shnbsd_store_inferior_registers): Rename from
store_inferior_registers. Make static.
(_initialize_shnbsd_nat): New function.
* Makefile.in (shnbsd-nat.o): Update dependencies.
* config/sh/nbsd.mh (NAT_CLIBS, NAT_FILE): Remove.
(NATDEPFILES): Remove infptrace.o and inftarg.o. Add
inf-ptrace.o.

Cambiar Resumen

Diferencia incremental

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,19 @@
11 2006-12-16 Mark Kettenis <kettenis@gnu.org>
22
3+ Add OpenBSD/sh native support.
4+ * NEWS (New native configurations): Mention OpenBSD/sh.
5+ * configure.host: Add sh*-*-openbsd*.
6+ * shnbsd-nat.c: Include "inf-ptrace.h".
7+ (shnbsd_fetch_inferior_registers): Rename from
8+ fetch_inferior_registers. Make static.
9+ (shnbsd_store_inferior_registers): Rename from
10+ store_inferior_registers. Make static.
11+ (_initialize_shnbsd_nat): New function.
12+ * Makefile.in (shnbsd-nat.o): Update dependencies.
13+ * config/sh/nbsd.mh (NAT_CLIBS, NAT_FILE): Remove.
14+ (NATDEPFILES): Remove infptrace.o and inftarg.o. Add
15+ inf-ptrace.o.
16+
317 Add OpenBSD/sh support.
418 * NEWS (New targets): Mention OpenBSD/sh.
519 * configure.tgt: Add sh*-*-openbsd*.
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2604,7 +2604,7 @@ sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
26042604 $(gdb_string_h) $(gdb_assert_h) $(arch_utils_h) $(regcache_h) \
26052605 $(osabi_h) $(elf_bfd_h) $(elf_sh_h) $(gdb_sim_sh_h)
26062606 shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \
2607- $(shnbsd_tdep_h)
2607+ $(shnbsd_tdep_h) $(inf_ptrace_h)
26082608 shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \
26092609 $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \
26102610 $(shnbsd_tdep_h)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -28,6 +28,10 @@ show breakpoint auto-hw
2828 "break" command and internal breakpoints used for other commands
2929 including "next" and "finish".
3030
31+* New native configurations
32+
33+OpenBSD/sh sh*-*openbsd*
34+
3135 * New targets
3236
3337 OpenBSD/sh sh*-*-openbsd*
--- a/gdb/config/sh/nbsd.mh
+++ b/gdb/config/sh/nbsd.mh
@@ -1,4 +1,2 @@
1-# Host: SuperH running NetBSD
2-NAT_CLIBS=
3-NATDEPFILES= infptrace.o inftarg.o fork-child.o shnbsd-nat.o
4-NAT_FILE= config/nm-nbsd.h
1+# Host: NetBSD/sh
2+NATDEPFILES= fork-child.o inf-ptrace.o shnbsd-nat.o
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -130,6 +130,7 @@ s390*-*-*) gdb_host=s390 ;;
130130
131131 sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
132132 gdb_host=nbsd ;;
133+sh*-*-openbsd*) gdb_host=nbsd ;;
133134
134135 sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
135136 gdb_host=fbsd ;;
--- a/gdb/shnbsd-nat.c
+++ b/gdb/shnbsd-nat.c
@@ -1,6 +1,7 @@
1-/* Native-dependent code for SuperH running NetBSD, for GDB.
1+/* Native-dependent code for NetBSD/sh.
2+
3+ Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
24
3- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
45 Contributed by Wasabi Systems, Inc.
56
67 This file is part of GDB.
@@ -20,15 +21,16 @@
2021 Foundation, Inc., 51 Franklin Street, Fifth Floor,
2122 Boston, MA 02110-1301, USA. */
2223
24+#include "defs.h"
25+#include "inferior.h"
26+
2327 #include <sys/types.h>
2428 #include <sys/ptrace.h>
2529 #include <machine/reg.h>
2630
27-#include "defs.h"
28-#include "inferior.h"
29-
3031 #include "sh-tdep.h"
3132 #include "shnbsd-tdep.h"
33+#include "inf-ptrace.h"
3234
3335 /* Determine if PT_GETREGS fetches this register. */
3436 #define GETREGS_SUPPLIES(regno) \
@@ -37,8 +39,8 @@
3739 || (regno) == MACH_REGNUM || (regno) == MACL_REGNUM \
3840 || (regno) == SR_REGNUM)
3941
40-void
41-fetch_inferior_registers (int regno)
42+static void
43+shnbsd_fetch_inferior_registers (int regno)
4244 {
4345 if (regno == -1 || GETREGS_SUPPLIES (regno))
4446 {
@@ -55,8 +57,8 @@ fetch_inferior_registers (int regno)
5557 }
5658 }
5759
58-void
59-store_inferior_registers (int regno)
60+static void
61+shnbsd_store_inferior_registers (int regno)
6062 {
6163 if (regno == -1 || GETREGS_SUPPLIES (regno))
6264 {
@@ -76,3 +78,17 @@ store_inferior_registers (int regno)
7678 return;
7779 }
7880 }
81+
82+/* Provide a prototype to silence -Wmissing-prototypes. */
83+void _initialize_shnbsd_nat (void);
84+
85+void
86+_initialize_shnbsd_nat (void)
87+{
88+ struct target_ops *t;
89+
90+ t = inf_ptrace_target ();
91+ t->to_fetch_registers = shnbsd_fetch_inferior_registers;
92+ t->to_store_registers = shnbsd_store_inferior_registers;
93+ add_target (t);
94+}