This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix m88k backtrace bug
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 30 May 2004 20:16:41 +0200 (CEST)
- Subject: [PATCH] Fix m88k backtrace bug
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* m88k-tdep.c (m88k_analyze_prologue): Fix handling of branch
instructions.
(m88k_frame_prev_register): Simplify code a bit.
Index: m88k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m88k-tdep.c,v
retrieving revision 1.11
diff -u -p -r1.11 m88k-tdep.c
--- m88k-tdep.c 24 May 2004 21:00:09 -0000 1.11
+++ m88k-tdep.c 30 May 2004 18:14:45 -0000
@@ -607,7 +607,7 @@ m88k_analyze_prologue (CORE_ADDR pc, COR
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_i
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. */