Revisión | bd37273160f1691c00eab2b3d7272a108619ebac (tree) |
---|---|
Tiempo | 2006-12-16 08:57:35 |
Autor | Mark Kettenis <kettenis@gnu....> |
Commiter | Mark Kettenis |
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.
@@ -1,5 +1,19 @@ | ||
1 | 1 | 2006-12-16 Mark Kettenis <kettenis@gnu.org> |
2 | 2 | |
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 | + | |
3 | 17 | Add OpenBSD/sh support. |
4 | 18 | * NEWS (New targets): Mention OpenBSD/sh. |
5 | 19 | * configure.tgt: Add sh*-*-openbsd*. |
@@ -2604,7 +2604,7 @@ sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \ | ||
2604 | 2604 | $(gdb_string_h) $(gdb_assert_h) $(arch_utils_h) $(regcache_h) \ |
2605 | 2605 | $(osabi_h) $(elf_bfd_h) $(elf_sh_h) $(gdb_sim_sh_h) |
2606 | 2606 | shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \ |
2607 | - $(shnbsd_tdep_h) | |
2607 | + $(shnbsd_tdep_h) $(inf_ptrace_h) | |
2608 | 2608 | shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \ |
2609 | 2609 | $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \ |
2610 | 2610 | $(shnbsd_tdep_h) |
@@ -28,6 +28,10 @@ show breakpoint auto-hw | ||
28 | 28 | "break" command and internal breakpoints used for other commands |
29 | 29 | including "next" and "finish". |
30 | 30 | |
31 | +* New native configurations | |
32 | + | |
33 | +OpenBSD/sh sh*-*openbsd* | |
34 | + | |
31 | 35 | * New targets |
32 | 36 | |
33 | 37 | OpenBSD/sh sh*-*-openbsd* |
@@ -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 |
@@ -130,6 +130,7 @@ s390*-*-*) gdb_host=s390 ;; | ||
130 | 130 | |
131 | 131 | sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu) |
132 | 132 | gdb_host=nbsd ;; |
133 | +sh*-*-openbsd*) gdb_host=nbsd ;; | |
133 | 134 | |
134 | 135 | sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu) |
135 | 136 | gdb_host=fbsd ;; |
@@ -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. | |
2 | 4 | |
3 | - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | |
4 | 5 | Contributed by Wasabi Systems, Inc. |
5 | 6 | |
6 | 7 | This file is part of GDB. |
@@ -20,15 +21,16 @@ | ||
20 | 21 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 | 22 | Boston, MA 02110-1301, USA. */ |
22 | 23 | |
24 | +#include "defs.h" | |
25 | +#include "inferior.h" | |
26 | + | |
23 | 27 | #include <sys/types.h> |
24 | 28 | #include <sys/ptrace.h> |
25 | 29 | #include <machine/reg.h> |
26 | 30 | |
27 | -#include "defs.h" | |
28 | -#include "inferior.h" | |
29 | - | |
30 | 31 | #include "sh-tdep.h" |
31 | 32 | #include "shnbsd-tdep.h" |
33 | +#include "inf-ptrace.h" | |
32 | 34 | |
33 | 35 | /* Determine if PT_GETREGS fetches this register. */ |
34 | 36 | #define GETREGS_SUPPLIES(regno) \ |
@@ -37,8 +39,8 @@ | ||
37 | 39 | || (regno) == MACH_REGNUM || (regno) == MACL_REGNUM \ |
38 | 40 | || (regno) == SR_REGNUM) |
39 | 41 | |
40 | -void | |
41 | -fetch_inferior_registers (int regno) | |
42 | +static void | |
43 | +shnbsd_fetch_inferior_registers (int regno) | |
42 | 44 | { |
43 | 45 | if (regno == -1 || GETREGS_SUPPLIES (regno)) |
44 | 46 | { |
@@ -55,8 +57,8 @@ fetch_inferior_registers (int regno) | ||
55 | 57 | } |
56 | 58 | } |
57 | 59 | |
58 | -void | |
59 | -store_inferior_registers (int regno) | |
60 | +static void | |
61 | +shnbsd_store_inferior_registers (int regno) | |
60 | 62 | { |
61 | 63 | if (regno == -1 || GETREGS_SUPPLIES (regno)) |
62 | 64 | { |
@@ -76,3 +78,17 @@ store_inferior_registers (int regno) | ||
76 | 78 | return; |
77 | 79 | } |
78 | 80 | } |
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 | +} |