aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-07-14 18:06:58 +0000
committerPedro Alves <palves@redhat.com>2008-07-14 18:06:58 +0000
commit5651477109e89a1a78c5c28cfac55c6141000754 (patch)
treedc04c9a021d5748e1bd9f178992dfb0b16f9ed56
parent74ed0bb4148e948d031523742a2250c539b01581 (diff)
downloadgdb-5651477109e89a1a78c5c28cfac55c6141000754.zip
gdb-5651477109e89a1a78c5c28cfac55c6141000754.tar.gz
gdb-5651477109e89a1a78c5c28cfac55c6141000754.tar.bz2
* i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
(i386_dicos_push_dummy_code): New. (i386_dicos_init_abi): Don't register i386_dicos_frame_align. Register i386_dicos_push_dummy_code.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/i386-dicos-tdep.c23
2 files changed, 22 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b9bce6e..bb12239 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-14 Pedro Alves <pedro@codesourcery.com>
+
+ * i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
+ (i386_dicos_push_dummy_code): New.
+ (i386_dicos_init_abi): Don't register i386_dicos_frame_align.
+ Register i386_dicos_push_dummy_code.
+
2008-07-14 Markus Deuling <deuling@de.ibm.com>
* mips-tdep.c (fp_register_arg_p): Add gdbarch as paramter.
diff --git a/gdb/i386-dicos-tdep.c b/gdb/i386-dicos-tdep.c
index 5fdaaba..99c3d6f 100644
--- a/gdb/i386-dicos-tdep.c
+++ b/gdb/i386-dicos-tdep.c
@@ -25,14 +25,21 @@
#include "inferior.h"
static CORE_ADDR
-i386_dicos_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
+i386_dicos_push_dummy_code (struct gdbarch *gdbarch,
+ CORE_ADDR sp, CORE_ADDR funaddr,
+ struct value **args, int nargs,
+ struct type *value_type,
+ CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
+ struct regcache *regcache)
{
- /* Having a call dummy on the stack requires a gdbarch_frame_align
- method to align the breakpoint instruction in the stack.
- Strictly speaking, we could just return SP pristine on x86. But,
- as long as we're providing a frame align method, might as well
- align for efficiency. */
- return sp & -(CORE_ADDR)16;
+ int bplen;
+ CORE_ADDR bppc = sp;
+
+ gdbarch_breakpoint_from_pc (gdbarch, &bppc, &bplen);
+ *bp_addr = sp - bplen;
+ *real_pc = funaddr;
+
+ return *bp_addr;
}
static void
@@ -46,7 +53,7 @@ i386_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
text location we could find with a symbol where to place the call
dummy, so we put it on the stack. */
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_frame_align (gdbarch, i386_dicos_frame_align);
+ set_gdbarch_push_dummy_code (gdbarch, i386_dicos_push_dummy_code);
}
/* Look in the elf symbol table of ABFD for a symbol named WANTED.