[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-patches
Subject:    [PATCH] Move 4.2BSD VAX stuff into its own tm-file
From:       thorpej () wasabisystems ! com (Jason R Thorpe)
Date:       2002-06-26 10:39:00
Message-ID: 20020626103905.D1614 () dr-evil ! shagadelic ! org
[Download RAW message or body]

All this stuff is 4.2BSD/Ultrix specific.  It needs to be moved to its
own header file.  tm-vax.h is now "pristine".

Committed as obvious.

        * config/vax/tm-vax.h: Protect from multiple inclusion.
        (TARGET_UPAGES, TARGET_NBPG, STACK_END_ADDR)
        (SIGTRAMP_START, SIGTRAMP_END, SIGCONTEXT_PC_OFFSET): Move to...
        * config/vax/tm-vaxbsd.h: ...here.  New file. 
        * config/vax/vax.mt (TM_FILE): Set to tm-vaxbsd.h.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: config/vax/tm-vax.h
===================================================================
RCS file: /cvs/src/src/gdb/config/vax/tm-vax.h,v
retrieving revision 1.15
diff -u -r1.15 tm-vax.h
--- config/vax/tm-vax.h	26 Jun 2002 17:20:36 -0000	1.15
+++ config/vax/tm-vax.h	26 Jun 2002 17:31:37 -0000
@@ -1,4 +1,4 @@
-/* Definitions to make GDB run on a vax under 4.2bsd.
+/* Target definitions for VAX systems for GDB.
    Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002
    Free Software Foundation, Inc.
 
@@ -19,22 +19,13 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
+#ifndef TM_VAX_H
+#define TM_VAX_H
 
-#define TARGET_UPAGES 14
-#define TARGET_NBPG 512
-#define STACK_END_ADDR (0x80000000 - (TARGET_UPAGES * TARGET_NBPG))
-
-/* On the VAX, sigtramp is in the u area.  Can't check the exact
-   addresses because for cross-debugging we don't have VAX include
-   files around.  This should be close enough.  */
-#define SIGTRAMP_START(pc)	STACK_END_ADDR
-#define SIGTRAMP_END(pc)	0x80000000
-
-/* Offset to saved PC in sigcontext, from <sys/signal.h>.  */
-/* XXXJRT should go away */
-#define SIGCONTEXT_PC_OFFSET 12
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
 
 /* XXXJRT not yet under gdbarch control */
 #define FRAME_ARGS_ADDRESS_CORRECT(fi) vax_frame_args_address_correct ((fi))
 extern CORE_ADDR vax_frame_args_address_correct (struct frame_info *);
+
+#endif /* TM_VAX_H */
Index: config/vax/tm-vaxbsd.h
===================================================================
RCS file: config/vax/tm-vaxbsd.h
diff -N config/vax/tm-vaxbsd.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/vax/tm-vaxbsd.h	26 Jun 2002 17:31:37 -0000
@@ -0,0 +1,41 @@
+/* Definitions to make GDB run on a vax under 4.2bsd.
+   Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 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_VAXBSD_H
+#define TM_VAXBSD_H
+
+#include "vax/tm-vax.h"
+
+#define TARGET_UPAGES 14
+#define TARGET_NBPG 512
+#define STACK_END_ADDR (0x80000000 - (TARGET_UPAGES * TARGET_NBPG))
+
+/* On the VAX, sigtramp is in the u area.  Can't check the exact
+   addresses because for cross-debugging we don't have VAX include
+   files around.  This should be close enough.  */
+#define SIGTRAMP_START(pc)	STACK_END_ADDR
+#define SIGTRAMP_END(pc)	0x80000000
+
+/* Offset to saved PC in sigcontext, from <sys/signal.h>.  */
+/* XXXJRT should go away */
+#define SIGCONTEXT_PC_OFFSET 12
+
+#endif /* TM_VAXBSD_H */
Index: config/vax/vax.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/vax/vax.mt,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 vax.mt
--- config/vax/vax.mt	16 Apr 1999 01:34:26 -0000	1.1.1.1
+++ config/vax/vax.mt	26 Jun 2002 17:31:37 -0000
@@ -1,3 +1,3 @@
 # Target: DEC VAX running BSD or Ultrix
 TDEPFILES= vax-tdep.o
-TM_FILE= tm-vax.h
+TM_FILE= tm-vaxbsd.h

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic