summaryrefslogtreecommitdiff
path: root/gdb/m88k-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-05-30 18:16:31 +0000
committerMark Kettenis <kettenis@gnu.org>2004-05-30 18:16:31 +0000
commit756b033a57e513162026b152edbb156dfe1b30dd (patch)
treea3eeb81c8ede54876a84e8828743159f216d61aa /gdb/m88k-tdep.c
parent820485c4335a9fc0b0d1d32af60a48618dca1e17 (diff)
downloadgdb-756b033a57e513162026b152edbb156dfe1b30dd.tar.gz
* m88k-tdep.c (m88k_analyze_prologue): Fix handling of branch
instructions. (m88k_frame_prev_register): Simplify code a bit.
Diffstat (limited to 'gdb/m88k-tdep.c')
-rw-r--r--gdb/m88k-tdep.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 42a702d064f..215f1db825b 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -607,7 +607,7 @@ m88k_analyze_prologue (CORE_ADDR pc, CORE_ADDR limit,
the instruction in the delay slot might be. Limit the
prologue analysis to the delay slot and record the branch
instruction as the end of the prologue. */
- limit = pc + M88K_INSN_SIZE;
+ limit = min (limit, pc + 2 * M88K_INSN_SIZE);
end = pc;
break;
@@ -736,11 +736,9 @@ m88k_frame_prev_register (struct frame_info *next_frame, void **this_cache,
lvalp, addrp, realnump, valuep);
pc = extract_unsigned_integer (valuep, 4);
- if (regnum == M88K_SNIP_REGNUM)
+ if (regnum == M88K_SFIP_REGNUM)
pc += 4;
- else if (regnum == M88K_SFIP_REGNUM)
- pc += 8;
- store_unsigned_integer (valuep, 4, pc);
+ store_unsigned_integer (valuep, 4, pc + 4);
}
/* It's a computed value. */