From: Corinna Vinschen Date: Thu, 2 Mar 2006 09:31:23 +0000 (+0000) Subject: * mn10300-tdep.c (mn10300_push_dummy_call): Write breakpoint X-Git-Tag: binutils-csl-2_17-branchpoint~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a64ae7e0640900786fcb0d20c2c98372dd12a885;p=external%2Fbinutils.git * mn10300-tdep.c (mn10300_push_dummy_call): Write breakpoint address to MDR register. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3fdd9a5..cbd4d1e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-03-02 Corinna Vinschen + + * mn10300-tdep.c (mn10300_push_dummy_call): Write breakpoint + address to MDR register. + 2006-03-01 Daniel Jacobowitz * gdbtypes.c (lookup_struct_elt_type): Correct noerr for recursive diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 47844d1..bc5e8d8 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -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;