aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-04-22 06:56:04 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-04-22 06:56:04 +0000
commit51eb8b084662694622b3d9b8b043b41176de132b (patch)
tree0e20448f7f1ad42ed221d94eb1decae20c39ed52 /gdb
parent4eb8c7fc85cabb0ea56703e37a3c6b6579f15622 (diff)
downloadgdb-51eb8b084662694622b3d9b8b043b41176de132b.zip
gdb-51eb8b084662694622b3d9b8b043b41176de132b.tar.gz
gdb-51eb8b084662694622b3d9b8b043b41176de132b.tar.bz2
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/config/vax/tm-vax.h25
-rw-r--r--gdb/vax-tdep.c43
3 files changed, 70 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 07e41de..67b30b8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h
index bfa243c..31acf00 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/config/vax/tm-vax.h
@@ -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. */
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index a5fbe3a..053041e 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -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.
@@ -52,6 +52,47 @@
static unsigned char *print_insn_arg ();
+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);
+}
+
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */