aboutsummaryrefslogtreecommitdiff
path: root/gdb/mn10300-tdep.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-03-02 09:31:23 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-03-02 09:31:23 +0000
commita64ae7e0640900786fcb0d20c2c98372dd12a885 (patch)
treefd660a7aa390bd536b3299479e8e9ded0f9ed1fc /gdb/mn10300-tdep.c
parent711de32caaff12a33dfcc10c0421388c7550bac0 (diff)
downloadgdb-a64ae7e0640900786fcb0d20c2c98372dd12a885.zip
gdb-a64ae7e0640900786fcb0d20c2c98372dd12a885.tar.gz
gdb-a64ae7e0640900786fcb0d20c2c98372dd12a885.tar.bz2
* mn10300-tdep.c (mn10300_push_dummy_call): Write breakpoint
address to MDR register.
Diffstat (limited to 'gdb/mn10300-tdep.c')
-rw-r--r--gdb/mn10300-tdep.c5
1 files changed, 5 insertions, 0 deletions
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;