Module Name: src
Committed By: bouyer
Date: Wed Feb 16 19:38:03 UTC 2011
Modified Files:
src/gnu/dist/gdb6/gdb [netbsd-5]: shnbsd-tdep.c
Log Message:
Pull up following revision(s) (requested by uwe in ticket #1542):
gnu/dist/gdb6/gdb/shnbsd-tdep.c: revision 1.6
Branch with delay slot executes delay slot even if branch is not
taken, so adjust next_pc logic accordingly. Fixes SIGILL
(breakpoint's "trapa" causes an illegal slot instruction exception)
when stepping through such branches.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/gnu/dist/gdb6/gdb/shnbsd-tdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/gnu/dist/gdb6/gdb/shnbsd-tdep.c
diff -u src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5 src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5.2.1
--- src/gnu/dist/gdb6/gdb/shnbsd-tdep.c:1.5 Mon Oct 27 00:33:19 2008
+++ src/gnu/dist/gdb6/gdb/shnbsd-tdep.c Wed Feb 16 19:38:03 2011
@@ -286,14 +286,14 @@
{
sr = read_register (SR_REGNUM);
+ delay_slot = CONDITIONAL_BRANCH_SLOT_P(insn);
if (!CONDITIONAL_BRANCH_TAKEN_P(insn, sr))
- next_pc = pc + 2;
+ next_pc = pc + (delay_slot ? 4 : 2);
else
{
displacement = shnbsd_displacement_8 (insn);
next_pc = pc + 4 + (displacement << 1);
- delay_slot = CONDITIONAL_BRANCH_SLOT_P(insn);
}
}