aboutsummaryrefslogtreecommitdiff
path: root/gdb/mn10200-tdep.c
diff options
context:
space:
mode:
authorMark Alexander <marka@cygnus>1998-06-25 06:20:35 +0000
committerMark Alexander <marka@cygnus>1998-06-25 06:20:35 +0000
commit9d4cd1e849e14e8af9d40e808bec837ffe09c88c (patch)
tree8e88866ac7901d6e312edbd8eef671542a178f1d /gdb/mn10200-tdep.c
parentd8332b2c481ddd3a43b911a225a42098cf8ab807 (diff)
downloadfsf-binutils-gdb-9d4cd1e849e14e8af9d40e808bec837ffe09c88c.zip
fsf-binutils-gdb-9d4cd1e849e14e8af9d40e808bec837ffe09c88c.tar.gz
fsf-binutils-gdb-9d4cd1e849e14e8af9d40e808bec837ffe09c88c.tar.bz2
* mn10200-tdep.c (mn10200_analyze_prologue): Fix calculation
of jsr target address.
Diffstat (limited to 'gdb/mn10200-tdep.c')
-rw-r--r--gdb/mn10200-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
index e2009e4..757f2ba 100644
--- a/gdb/mn10200-tdep.c
+++ b/gdb/mn10200-tdep.c
@@ -328,7 +328,7 @@ mn10200_analyze_prologue (fi, pc)
}
/* Get the PC this instruction will branch to. */
- temp = (extract_signed_integer (buf, 2) + addr) & 0xffffff;
+ temp = (extract_signed_integer (buf, 2) + addr + 3) & 0xffffff;
/* Get the name of the function at the target address. */
status = find_pc_partial_function (temp, &name, NULL, NULL);
@@ -369,7 +369,7 @@ mn10200_analyze_prologue (fi, pc)
}
/* Get the PC this instruction will branch to. */
- temp = (extract_signed_integer (buf, 3) + addr) & 0xffffff;
+ temp = (extract_signed_integer (buf, 3) + addr + 5) & 0xffffff;
/* Get the name of the function at the target address. */
status = find_pc_partial_function (temp, &name, NULL, NULL);