From 9d4cd1e849e14e8af9d40e808bec837ffe09c88c Mon Sep 17 00:00:00 2001 From: Mark Alexander Date: Thu, 25 Jun 1998 06:20:35 +0000 Subject: [PATCH] * mn10200-tdep.c (mn10200_analyze_prologue): Fix calculation of jsr target address. --- gdb/ChangeLog | 5 +++++ gdb/mn10200-tdep.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 77df93c911e..f849ff1d92a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 24 23:17:12 1998 Mark Alexander + + * mn10200-tdep.c (mn10200_analyze_prologue): Fix calculation + of jsr target address. + Tue Jun 23 19:37:46 1998 Mark Alexander * config/mn10200/tm-mn10200.h (SAVED_PC_AFTER_CALL): Don't diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c index e2009e44bc4..757f2bae37e 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); -- 2.30.2