summaryrefslogtreecommitdiff
path: root/gdb/vax-tdep.c
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-04-22 23:13:50 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-04-22 23:13:50 +0000
commitf5c1c932a2f38a779ee2cf0ea70a1318598c3ee4 (patch)
tree31a5055c4e21f7b65d81392e0a0aa919992a5517 /gdb/vax-tdep.c
parentbe3aae7fab86d47f79bd6713c1be79995dce9b80 (diff)
downloadgdb-f5c1c932a2f38a779ee2cf0ea70a1318598c3ee4.tar.gz
* vax-tdep.c: Include regcache.h.
(vax_call_dummy_words): New. (sizeof_vax_call_dummy_words): New. (vax_fix_call_dummy): New function. (vax_saved_pc_after_call): Ditto. * config/vax/tm-vax.h: Don't include regcache.h. (SAVED_PC_AFTER_CALL): Use vax_saved_pc_after_call. (CALL_DUMMY): Remove. (CALL_DUMMY_WORDS): Define. (SIZEOF_CALL_DUMMY_WORDS): Define. (FIX_CALL_DUMMY): Use vax_fix_call_dummy.
Diffstat (limited to 'gdb/vax-tdep.c')
-rw-r--r--gdb/vax-tdep.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index d8cc678e776..8fc299763de 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -23,6 +23,7 @@
#include "symtab.h"
#include "opcode/vax.h"
#include "gdbcore.h"
+#include "regcache.h"
#include "frame.h"
#include "value.h"
@@ -234,6 +235,24 @@ vax_pop_frame (void)
write_register (SP_REGNUM, fp);
flush_cached_frames ();
}
+
+/* The VAX call dummy sequence:
+
+ calls #69, @#32323232
+ bpt
+
+ It is 8 bytes long. The address and argc are patched by
+ vax_fix_call_dummy(). */
+LONGEST vax_call_dummy_words[] = { 0x329f69fb, 0x03323232 };
+int sizeof_vax_call_dummy_words = sizeof(vax_call_dummy_words);
+
+void
+vax_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
+ struct value **args, struct type *type, int gcc_p)
+{
+ dummy[1] = nargs;
+ store_unsigned_integer (dummy + 3, 4, fun);
+}
void
vax_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
@@ -288,7 +307,12 @@ vax_skip_prologue (CORE_ADDR pc)
return pc;
}
-
+CORE_ADDR
+vax_saved_pc_after_call (struct frame_info *frame)
+{
+ return (FRAME_SAVED_PC(frame));
+}
+
/* Print the vax instruction at address MEMADDR in debugged memory,
from disassembler info INFO.
Returns length of the instruction, in bytes. */