aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/kernel/kgdb_stub.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-05-08 14:50:59 +0900
committerPaul Mundt <lethal@hera.kernel.org>2007-05-09 01:35:01 +0000
commitbd0799977cb9b68aa6a39e9630aeea4778a58385 (patch)
tree125c0c923701c5b6f823a7b614c295e06370d46c /arch/sh/kernel/kgdb_stub.c
parent51c8b856f5edfa45d956721aa6d6ebaa15699062 (diff)
sh: Support for SH-2A 32-bit opcodes.
SH-2A supports both 16 and 32-bit instructions, add a simple helper for figuring out the instruction size in the places where there are hardcoded 16-bit assumptions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/kgdb_stub.c')
-rw-r--r--arch/sh/kernel/kgdb_stub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/kgdb_stub.c b/arch/sh/kernel/kgdb_stub.c
index a5323364cbc..ffe3e3ee580 100644
--- a/arch/sh/kernel/kgdb_stub.c
+++ b/arch/sh/kernel/kgdb_stub.c
@@ -867,7 +867,7 @@ static void kgdb_command_loop(const int excep_code, const int trapa_value)
trap 0xff, since that indicates a compiled-in breakpoint which
will not be replaced (and we would retake the trap forever) */
if ((excep_code == TRAP_VEC) && (trapa_value != (0x3c << 2)))
- trap_registers.pc -= 2;
+ trap_registers.pc -= instruction_size(trap_registers.pc);
/* Undo any stepping we may have done */
undo_single_step();