* vax-tdep.c: Update copyright years.
authorJason Thorpe <thorpej@netbsd.org>
Mon, 22 Apr 2002 06:56:04 +0000 (06:56 +0000)
committerJason Thorpe <thorpej@netbsd.org>
Mon, 22 Apr 2002 06:56:04 +0000 (06:56 +0000)
(vax_register_name): New function.
(vax_register_byte): Ditto.
(vax_register_raw_size): Ditto.
(vax_register_virtual_size): Ditto.
(vax_register_virtual_type): Ditto.
* config/vax/tm-vax.h: Update copyright years.
(REGISTER_NAMES): Remove.
(REGISTER_NAME): Define.
(REGISTER_BYTE): Use vax_register_byte.
(REGISTER_RAW_SIZE): Use vax_register_raw_size.
(REGISTER_VIRTUAL_SIZE): Use vax_register_virtual_size.
(REGISTER_VIRTUAL_TYPE): Use vax_register_virtual_type.

gdb/ChangeLog
gdb/config/vax/tm-vax.h
gdb/vax-tdep.c

index 07e41de8f6b258a2cc4cda310099910de2abfa20..67b30b8384eb06eac2a74aa5563355fb44061502 100644 (file)
@@ -1,3 +1,19 @@
+2002-04-22  Jason Thorpe  <thorpej@wasabisystems.com>
+
+       * vax-tdep.c: Update copyright years.
+       (vax_register_name): New function.
+       (vax_register_byte): Ditto.
+       (vax_register_raw_size): Ditto.
+       (vax_register_virtual_size): Ditto.
+       (vax_register_virtual_type): Ditto.
+       * config/vax/tm-vax.h: Update copyright years.
+       (REGISTER_NAMES): Remove.
+       (REGISTER_NAME): Define.
+       (REGISTER_BYTE): Use vax_register_byte.
+       (REGISTER_RAW_SIZE): Use vax_register_raw_size.
+       (REGISTER_VIRTUAL_SIZE): Use vax_register_virtual_size.
+       (REGISTER_VIRTUAL_TYPE): Use vax_register_virtual_type.
+
 2002-04-21  Andrew Cagney  <ac131313@redhat.com>
 
        * config/sparc/tm-sparc.h (sparc_skip_prologue): Restore
index bfa243cfff2e854330f57623e3d9d6e72931afe9..31acf004351e09881ef9a14fb140327658b3add9 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions to make GDB run on a vax under 4.2bsd.
-   Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000
+   Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -73,10 +73,9 @@ extern CORE_ADDR vax_skip_prologue (CORE_ADDR);
 
 #define NUM_REGS 17
 
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.  */
-
-#define REGISTER_NAMES {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "ap", "fp", "sp", "pc", "ps"}
+/* Return the name of the register specified by N.  */
+#define REGISTER_NAME(N) vax_register_name ((N))
+extern char *vax_register_name (int);
 
 /* Register numbers of various important registers.
    Note that some of these values are "real" register numbers,
@@ -97,18 +96,18 @@ extern CORE_ADDR vax_skip_prologue (CORE_ADDR);
 
 /* Index within `registers' of the first byte of the space for
    register N.  */
-
-#define REGISTER_BYTE(N) ((N) * 4)
+#define REGISTER_BYTE(N) vax_register_byte ((N))
+extern int vax_register_byte (int);
 
 /* Number of bytes of storage in the actual machine representation
    for register N.  On the vax, all regs are 4 bytes.  */
-
-#define REGISTER_RAW_SIZE(N) 4
+#define REGISTER_RAW_SIZE(N) vax_register_raw_size ((N))
+extern int vax_register_raw_size (int);
 
 /* Number of bytes of storage in the program's representation
    for register N.  On the vax, all regs are 4 bytes.  */
-
-#define REGISTER_VIRTUAL_SIZE(N) 4
+#define REGISTER_VIRTUAL_SIZE(N) vax_register_virtual_size ((N))
+extern int vax_register_virtual_size (int);
 
 /* Largest value REGISTER_RAW_SIZE can have.  */
 
@@ -120,8 +119,8 @@ extern CORE_ADDR vax_skip_prologue (CORE_ADDR);
 
 /* Return the GDB type object for the "standard" data type
    of data in register N.  */
-
-#define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
+#define REGISTER_VIRTUAL_TYPE(N) vax_register_virtual_type ((N))
+extern struct type *vax_register_virtual_type (int);
 
 /* Store the address of the place in which to copy the structure the
    subroutine will return.  This is called from call_function. */
index a5fbe3a9d7227cf41f2c43a4bd2016298950ce52..053041e7ec6905d1faaca6289506c7f742803610 100644 (file)
@@ -1,5 +1,5 @@
 /* Print VAX instructions for GDB, the GNU debugger.
-   Copyright 1986, 1989, 1991, 1992, 1995, 1996, 1998, 1999, 2000
+   Copyright 1986, 1989, 1991, 1992, 1995, 1996, 1998, 1999, 2000, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 static unsigned char *print_insn_arg ();
 \f
+char *
+vax_register_name (int regno)
+{
+  static char *register_names[] =
+  {
+    "r0",  "r1",  "r2",  "r3", "r4", "r5", "r6", "r7",
+    "r8",  "r9", "r10", "r11", "ap", "fp", "sp", "pc",
+    "ps",
+  };
+
+  if (regno < 0)
+    return (NULL);
+  if (regno >= (sizeof(register_names) / sizeof(*register_names)))
+    return (NULL);
+  return (register_names[regno]);
+}
+
+int
+vax_register_byte (int regno)
+{
+  return (regno * 4);
+}
+
+int
+vax_register_raw_size (int regno)
+{
+  return (4);
+}
+
+int
+vax_register_virtual_size (int regno)
+{
+  return (4);
+}
+
+struct type *
+vax_register_virtual_type (int regno)
+{
+  return (builtin_type_int);
+}
+\f
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
This page took 0.029672 seconds and 4 git commands to generate.