aboutsummaryrefslogtreecommitdiff
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
commita33f755889cb0954f969aefe18acdffaf3b59d8f (patch)
tree7c268b18a3aba3642f32ee21078eb185eff9fe71 /gdb/vax-tdep.c
parent47a73475e95599c23aca725826e85f0c057cf233 (diff)
downloadgdb-a33f755889cb0954f969aefe18acdffaf3b59d8f.zip
gdb-a33f755889cb0954f969aefe18acdffaf3b59d8f.tar.gz
gdb-a33f755889cb0954f969aefe18acdffaf3b59d8f.tar.bz2
* 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 d8cc678..8fc2997 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. */