aboutsummaryrefslogtreecommitdiff
path: root/gdb/vax-tdep.c
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-04-22 20:59:28 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-04-22 20:59:28 +0000
commitea74468cd028a4fc0a500ae8f7a13ba373b9af99 (patch)
treec71faf96f20285e58072285bdaa7fee8c66db2ac /gdb/vax-tdep.c
parent5516aa921e57f45c4d2bd559209c67f4b81d8368 (diff)
downloadgdb-ea74468cd028a4fc0a500ae8f7a13ba373b9af99.zip
gdb-ea74468cd028a4fc0a500ae8f7a13ba373b9af99.tar.gz
gdb-ea74468cd028a4fc0a500ae8f7a13ba373b9af99.tar.bz2
* vax-tdep.c (vax_store_struct_return): New function.
(vax_extract_return_value): Ditto. (vax_store_return_value): Ditto. (vax_extract_struct_value_address): Ditto. * config/vax/tm-vax.h (STORE_STRUCT_RETURN): Use vax_store_struct_return. (EXTRACT_RETURN_VALUE): Use vax_extract_return_value. (STORE_RETURN_VALUE): Use vax_store_return_value. (EXTRACT_STRUCT_VALUE_ADDRESS): Use vax_extract_struct_value_address.
Diffstat (limited to 'gdb/vax-tdep.c')
-rw-r--r--gdb/vax-tdep.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 8e4c083..2ff2187 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -178,6 +178,30 @@ vax_frame_num_args (struct frame_info *fi)
return (0xff & read_memory_integer (FRAME_ARGS_ADDRESS (fi), 1));
}
+void
+vax_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+ write_register (1, addr);
+}
+
+void
+vax_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
+{
+ memcpy (valbuf, regbuf + REGISTER_BYTE (0), TYPE_LENGTH (valtype));
+}
+
+void
+vax_store_return_value (struct type *valtype, char *valbuf)
+{
+ write_register_bytes (0, valbuf, TYPE_LENGTH (valtype));
+}
+
+CORE_ADDR
+vax_extract_struct_value_address (char *regbuf)
+{
+ return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
+}
+
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */