This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMIT] Alpha *BSD target vector inheritance


Tested on alpha-unknown-freebsd5.4.

Mark


Index: gdb/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* alphabsd-nat.c: Update copyright year.  Include "inf-ptrace.h".
	(alphabsd_fetch_inferior_registers): Rename from
	fetch_inferior_registers.  Make static.
	(alphabsd_store_inferior_registers): Rename from
	store_inferior_registers.  Make static.
	(_initialize_alphabsd_nat): New function.
	* Makefile.in (alphabsd-nat.o): Update dependencies.
	* config/alpha/fbsd.mh (NATDEPFILES): Remove infptrace.o and
	inftarg.o.  Add inf-ptrace.o, fbsd-nat.o and gcore.o.
	* config/alpha/nbsd.mh (NAT_CLIBS): Remove variable.
	(NATDEPFILES): Remove infptrace.o and inftarg.o.  Add
	alphabsd-nat.o.
	* config/alpha/nm-fbsd.h: Update copyright year.  Don't include
	"config/nm-bsd.h" and "elf/common.h".
	* config/alpha/nm-nbsd.h: Update copyright year.  Don't include
	"config/nm-nbsd.h".

Index: gdb/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.700
diff -u -p -r1.700 Makefile.in
--- gdb/Makefile.in 4 Mar 2005 17:52:52 -0000 1.700
+++ gdb/Makefile.in 5 Mar 2005 14:30:54 -0000
@@ -1647,7 +1647,7 @@ aix-thread.o: aix-thread.c $(defs_h) $(g
 	$(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(ppc_tdep_h) \
 	$(gdb_string_h)
 alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
-	$(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
+	$(alpha_tdep_h) $(alphabsd_tdep_h) $(inf_ptrace_h) $(gregset_h)
 alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(alpha_tdep_h) \
 	$(alphabsd_tdep_h)
 alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \
Index: gdb/alphabsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/alphabsd-nat.c,v
retrieving revision 1.13
diff -u -p -r1.13 alphabsd-nat.c
--- gdb/alphabsd-nat.c 5 Jan 2005 15:43:42 -0000 1.13
+++ gdb/alphabsd-nat.c 5 Mar 2005 14:30:54 -0000
@@ -1,6 +1,6 @@
 /* Native-dependent code for Alpha BSD's.
 
-   Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,7 @@
 
 #include "alpha-tdep.h"
 #include "alphabsd-tdep.h"
+#include "inf-ptrace.h"
 
 #include <sys/types.h>
 #include <sys/ptrace.h>
@@ -83,8 +84,8 @@ getregs_supplies (int regno)
 /* Fetch register REGNO from the inferior.  If REGNO is -1, do this
    for all registers (including the floating point registers).  */
 
-void
-fetch_inferior_registers (int regno)
+static void
+alphabsd_fetch_inferior_registers (int regno)
 {
   if (regno == -1 || getregs_supplies (regno))
     {
@@ -114,8 +115,8 @@ fetch_inferior_registers (int regno)
 /* Store register REGNO back into the inferior.  If REGNO is -1, do
    this for all registers (including the floating point registers).  */
 
-void
-store_inferior_registers (int regno)
+static void
+alphabsd_store_inferior_registers (int regno)
 {
   if (regno == -1 || getregs_supplies (regno))
     {
@@ -149,3 +150,17 @@ store_inferior_registers (int regno)
 	perror_with_name (_("Couldn't write floating point status"));
     }
 }
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_alphabsd_nat (void);
+
+void
+_initialize_alphabsd_nat (void)
+{
+  struct target_ops *t;
+
+  t = inf_ptrace_target ();
+  t->to_fetch_registers = alphabsd_fetch_inferior_registers;
+  t->to_store_registers = alphabsd_store_inferior_registers;
+  add_target (t);
+}
Index: gdb/config/alpha/fbsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/fbsd.mh,v
retrieving revision 1.6
diff -u -p -r1.6 fbsd.mh
--- gdb/config/alpha/fbsd.mh 20 Jan 2002 01:12:50 -0000 1.6
+++ gdb/config/alpha/fbsd.mh 5 Mar 2005 14:30:54 -0000
@@ -1,5 +1,6 @@
-# Host: FreeBSD/Alpha
-NATDEPFILES= fork-child.o infptrace.o inftarg.o \
-	solib.o solib-svr4.o solib-legacy.o \
-	corelow.o core-regset.o alphabsd-nat.o
+# Host: FreeBSD/alpha
+NATDEPFILES= fork-child.o inf-ptrace.o \
+	fbsd-nat.o alphabsd-nat.o \
+	gcore.o solib.o solib-svr4.o solib-legacy.o \
+	corelow.o core-regset.o
 NAT_FILE= nm-fbsd.h
Index: gdb/config/alpha/nbsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/nbsd.mh,v
retrieving revision 1.4
diff -u -p -r1.4 nbsd.mh
--- gdb/config/alpha/nbsd.mh 11 May 2002 21:46:16 -0000 1.4
+++ gdb/config/alpha/nbsd.mh 5 Mar 2005 14:30:54 -0000
@@ -1,4 +1,3 @@
-# Host: Alpha running NetBSD
-NAT_CLIBS=
-NATDEPFILES= infptrace.o inftarg.o fork-child.o alphabsd-nat.o
+# Host: NetBSD/alpha
+NATDEPFILES= fork-child.o inf-ptrace.o alphabsd-nat.o
 NAT_FILE= nm-nbsd.h
Index: gdb/config/alpha/nm-fbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/nm-fbsd.h,v
retrieving revision 1.6
diff -u -p -r1.6 nm-fbsd.h
--- gdb/config/alpha/nm-fbsd.h 13 Mar 2004 13:07:19 -0000 1.6
+++ gdb/config/alpha/nm-fbsd.h 5 Mar 2005 14:30:54 -0000
@@ -1,6 +1,6 @@
-/* Native-dependent definitions for FreeBSD/Alpha.
+/* Native-dependent definitions for FreeBSD/alpha.
 
-   Copyright 1986, 1987, 1989, 1992, 1996, 2000, 2004
+   Copyright 1986, 1987, 1989, 1992, 1996, 2000, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -23,9 +23,6 @@
 #ifndef NM_FBSD_H
 #define NM_FBSD_H
 
-/* Get generic BSD native definitions.  */
-#include "config/nm-bsd.h"
-
 /* The Alpha does not step over a breakpoint.  */
 #define CANNOT_STEP_BREAKPOINT 1
 
@@ -33,6 +30,5 @@
 /* Shared library support.  */
 
 #include "solib.h"		/* Support for shared libraries. */
-#include "elf/common.h"		/* Additional ELF shared library info. */
 
-#endif /* NM_FBSD_H */
+#endif /* nm-fbsd.h */
Index: gdb/config/alpha/nm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/nm-nbsd.h,v
retrieving revision 1.4
diff -u -p -r1.4 nm-nbsd.h
--- gdb/config/alpha/nm-nbsd.h 18 Oct 2002 19:34:39 -0000 1.4
+++ gdb/config/alpha/nm-nbsd.h 5 Mar 2005 14:30:54 -0000
@@ -1,5 +1,7 @@
-/* Native-dependent definitions for Alpha running NetBSD, for GDB.
-   Copyright 2002 Free Software Foundation, Inc.
+/* Native-dependent definitions for NetBSD/alpha.
+
+   Copyright 2002, 2005 Free Software Foundation, Inc.
+
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
@@ -22,10 +24,7 @@
 #ifndef NM_NBSD_H
 #define NM_NBSD_H
 
-/* Get generic NetBSD native definitions.  */
-#include "config/nm-nbsd.h"
-
 /* The Alpha does not step over a breakpoint.  */
 #define CANNOT_STEP_BREAKPOINT 1
 
-#endif /* NM_NBSD_H */
+#endif /* nm-nbsd.h */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]