+
+ * i386-tdep.c (i386_push_dummy_frame): Don't write back the
+ modified frame pointer until the old frame pointer has been saved.
+
* arch-utils.c (initialize_current_architecture): Test byte_order
i386_push_dummy_frame (void)
{
CORE_ADDR sp = read_register (SP_REGNUM);
+ CORE_ADDR fp;
int regnum;
char regbuf[MAX_REGISTER_RAW_SIZE];
sp = push_word (sp, read_register (PC_REGNUM));
sp = push_word (sp, read_register (FP_REGNUM));
- write_register (FP_REGNUM, sp);
+ fp = sp;
for (regnum = 0; regnum < NUM_REGS; regnum++)
{
read_register_gen (regnum, regbuf);
sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
}
write_register (SP_REGNUM, sp);
+ write_register (FP_REGNUM, fp);
}
/* Insert the (relative) function address into the call sequence