* mn10300-tdep.c (mn10300_push_dummy_call): Write breakpoint
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 2 Mar 2006 09:31:23 +0000 (09:31 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 2 Mar 2006 09:31:23 +0000 (09:31 +0000)
address to MDR register.

gdb/ChangeLog
gdb/mn10300-tdep.c

index 3fdd9a5dfe78b3aa6d82f27d69fa3c223ab05e55..cbd4d1e5b52fac376bf10da8846b5407903278c6 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-02  Corinna Vinschen  <vinschen@redhat.com>
+
+       * mn10300-tdep.c (mn10300_push_dummy_call): Write breakpoint
+       address to MDR register.
+
 2006-03-01  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * gdbtypes.c (lookup_struct_elt_type): Correct noerr for recursive
index 47844d1a6d2a2d1dcfc1764ab0d553a261dc2ec7..bc5e8d8d1550175fe08b301a07949296687fca36 100644 (file)
@@ -1055,6 +1055,11 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch,
   /* Push the return address that contains the magic breakpoint.  */
   sp -= 4;
   write_memory_unsigned_integer (sp, push_size, bp_addr);
+
+  /* The CPU also writes the return address always into the
+     MDR register on "call".  */
+  regcache_cooked_write_unsigned (regcache, E_MDR_REGNUM, bp_addr);
+
   /* Update $sp.  */
   regcache_cooked_write_unsigned (regcache, E_SP_REGNUM, sp);
   return sp;