summaryrefslogtreecommitdiff
path: root/gdb/vax-tdep.c
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
commitd8d1cfb1beb039d7ec19277355ffb749d95fa25b (patch)
tree2a064c01315316688bf9f8745ac331507f1b29ea /gdb/vax-tdep.c
parentf33165369ce6eec1a6bb6a1dfacbdd470033a2fe (diff)
downloadgdb-d8d1cfb1beb039d7ec19277355ffb749d95fa25b.tar.gz
* 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/vax-tdep.c')
-rw-r--r--gdb/vax-tdep.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index a5fbe3a9d72..053041e7ec6 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. */