From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32092 invoked by alias); 22 Apr 2002 01:15:46 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32083 invoked from network); 22 Apr 2002 01:15:45 -0000 Received: from unknown (HELO dr-evil.shagadelic.org) (208.176.2.162) by sources.redhat.com with SMTP; 22 Apr 2002 01:15:45 -0000 Received: by dr-evil.shagadelic.org (Postfix, from userid 7518) id D49AF9869; Sun, 21 Apr 2002 18:15:44 -0700 (PDT) Date: Sun, 21 Apr 2002 18:15:00 -0000 From: Jason R Thorpe To: gdb-patches@sources.redhat.com Subject: [PATCH] Use multi-arch'd START_INFERIOR_TRAPS_EXPECTED on Alpha target Message-ID: <20020421181544.S1627@dr-evil.shagadelic.org> Reply-To: thorpej@wasabisystems.com Mail-Followup-To: Jason R Thorpe , gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Sf3MmCJcUNNLokcm" Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: Wasabi Systems, Inc. X-SW-Source: 2002-04/txt/msg00759.txt.bz2 --Sf3MmCJcUNNLokcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 764 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 --Sf3MmCJcUNNLokcm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=alpha-start-patch Content-length: 6361 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 */ --Sf3MmCJcUNNLokcm--