Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Use multi-arch'd START_INFERIOR_TRAPS_EXPECTED on Alpha target
@ 2002-04-21 18:15 Jason R Thorpe
  2002-04-24 17:06 ` Andrew Cagney
  0 siblings, 1 reply; 8+ messages in thread
From: Jason R Thorpe @ 2002-04-21 18:15 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

The following can happen when my STARTUP_WITH_SHELL and
START_INFERIOR_TRAPS_EXPECTED change to gdbarch go in.

Note that config/alpha/tm-fbsd.h is now empty, and thus deleted.  The
same also goes for config/alpha/tm-nbsd.h in my patch that adds the
alpha-*-netbsd* target.

	* Makefile.in (ALLDEPFILES): Add alpha-osf1-tdep.c.
	(alpha-osf1-tdep.o): New dependency list.
	* alpha-osf1-tdep.c: New file.
	* config/alpha/alpha-osf1.mt (TDEPFILES): Add alpha-osf1-tdep.o.
	* config/alpha/fbsd.mt (TM_FILE): Set to tm-alpha.h.
	* config/alpha/tm-alpha.h (START_INFERIOR_TRAPS_EXPECTED): Remove.
	* config/alpha/tm-alphalinux.h (START_INFERIOR_TRAPS_EXPECTED): Remove.
	* config/alpha/tm-fbsd.h: Delete file.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

[-- Attachment #2: alpha-start-patch --]
[-- Type: text/plain, Size: 6361 bytes --]

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.172
diff -u -r1.172 Makefile.in
--- Makefile.in	21 Apr 2002 22:03:10 -0000	1.172
+++ Makefile.in	22 Apr 2002 01:06:26 -0000
@@ -1174,8 +1174,8 @@
 ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
 	29k-share/udi/udi2go32.c \
 	a29k-tdep.c a68v-nat.c \
-	alpha-nat.c alphabsd-nat.c alpha-tdep.c alpha-linux-tdep.c \
-	alphafbsd-tdep.c \
+	alpha-nat.c alphabsd-nat.c alpha-tdep.c \
+	alpha-linux-tdep.c alpha-osf1-tdep.c alphafbsd-tdep.c \
 	arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \
 	armnbsd-nat.c armnbsd-tdep.c \
 	coff-solib.c \
@@ -1250,6 +1250,8 @@
 	$(regcache_h) $(doublest_h) $(BFD_SRC)/elf-bfd.h alpha-tdep.h
 
 alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(value_h) alpha-tdep.h
+
+alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(value_h) alpha-tdep.h
 
 alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) alpha-tdep.h
 
Index: alpha-osf1-tdep.c
===================================================================
RCS file: alpha-osf1-tdep.c
diff -N alpha-osf1-tdep.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ alpha-osf1-tdep.c	22 Apr 2002 01:06:27 -0000
@@ -0,0 +1,37 @@
+/* Target-dependent code for OSF/1 on Alpha.
+   Copyright 2002 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., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include "defs.h"
+#include "value.h"
+
+#include "alpha-tdep.h"
+
+static void
+alpha_osf1_init_abi (struct gdbarch_info info,
+                     struct gdbarch *gdbarch)
+{
+  set_gdbarch_start_inferior_traps_expected (gdbarch, 3);
+}
+
+void
+_initialize_alpha_osf1_tdep (void)
+{
+  alpha_gdbarch_register_os_abi (ALPHA_ABI_OSF1, alpha_osf1_init_abi);
+}
Index: config/alpha/alpha-osf1.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/alpha-osf1.mt,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 alpha-osf1.mt
--- config/alpha/alpha-osf1.mt	16 Apr 1999 01:34:14 -0000	1.1.1.1
+++ config/alpha/alpha-osf1.mt	22 Apr 2002 01:06:41 -0000
@@ -1,3 +1,3 @@
 # Target: Little-endian Alpha
-TDEPFILES= alpha-tdep.o
+TDEPFILES= alpha-tdep.o alpha-osf1-tdep.o
 TM_FILE= tm-alpha.h
Index: config/alpha/fbsd.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/fbsd.mt,v
retrieving revision 1.2
diff -u -r1.2 fbsd.mt
--- config/alpha/fbsd.mt	25 Jan 2001 18:41:23 -0000	1.2
+++ config/alpha/fbsd.mt	22 Apr 2002 01:06:41 -0000
@@ -1,3 +1,3 @@
 # Target: FreeBSD/Alpha
 TDEPFILES= alpha-tdep.o alphafbsd-tdep.o
-TM_FILE= tm-fbsd.h
+TM_FILE= tm-alpha.h
Index: config/alpha/tm-alpha.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/tm-alpha.h,v
retrieving revision 1.22
diff -u -r1.22 tm-alpha.h
--- config/alpha/tm-alpha.h	21 Apr 2002 20:27:29 -0000	1.22
+++ config/alpha/tm-alpha.h	22 Apr 2002 01:06:41 -0000
@@ -36,12 +36,6 @@
 struct value;
 struct symbol;
 
-/* Number of traps that happen between exec'ing the shell 
- * to run an inferior, and when we finally get to 
- * the inferior code.  This is 2 on most implementations.
- */
-#define START_INFERIOR_TRAPS_EXPECTED 3
-
 /* Offset from address of function to start of its code.
    Zero on most machines.  */
 
Index: config/alpha/tm-alphalinux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/tm-alphalinux.h,v
retrieving revision 1.4
diff -u -r1.4 tm-alphalinux.h
--- config/alpha/tm-alphalinux.h	24 Feb 2002 22:56:04 -0000	1.4
+++ config/alpha/tm-alphalinux.h	22 Apr 2002 01:06:41 -0000
@@ -39,13 +39,6 @@
 #define SIGTRAMP_END(pc)	(SIGTRAMP_START(pc) + 3*4)
 
 
-/* Number of traps that happen between exec'ing the shell to run an
-   inferior, and when we finally get to the inferior code.  This is 2
-   on GNU/Linux and most implementations.  */
-
-#undef START_INFERIOR_TRAPS_EXPECTED
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
 /* Return TRUE if procedure descriptor PROC is a procedure descriptor
    that refers to a dynamically generated sigtramp function.  */
 
Index: config/alpha/tm-fbsd.h
===================================================================
RCS file: config/alpha/tm-fbsd.h
diff -N config/alpha/tm-fbsd.h
--- config/alpha/tm-fbsd.h	21 Apr 2002 20:17:28 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-/* Target-dependent definitions for FreeBSD/Alpha.
-   Copyright 2000, 2001, 2002 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., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#ifndef TM_FBSD_H
-#define TM_FBSD_H
-
-#include "alpha/tm-alpha.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 */

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-04-25 22:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-21 18:15 [PATCH] Use multi-arch'd START_INFERIOR_TRAPS_EXPECTED on Alpha target Jason R Thorpe
2002-04-24 17:06 ` Andrew Cagney
2002-04-24 17:45   ` Jason R Thorpe
2002-04-24 18:04   ` Jason R Thorpe
2002-04-24 19:30     ` Andrew Cagney
2002-04-25 13:03   ` Daniel Jacobowitz
2002-04-25 14:29     ` Michael Snyder
2002-04-25 15:00       ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox