diff options
author | Jim Wilson <jimw@sifive.com> | 2018-07-14 17:34:39 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2018-08-13 08:31:30 -0700 |
commit | 758914fea278658943e3a56e4d373ae8c6f0d9e5 (patch) | |
tree | fa3feae3aca87305f5c23ff7187f51cc986c615e /arch/riscv/kernel | |
parent | a89757daf25cfe5320a5f40773271d86e2456c10 (diff) | |
download | linux-758914fea278658943e3a56e4d373ae8c6f0d9e5.tar.bz2 |
RISC-V: Don't increment sepc after breakpoint.
Adding 4 to sepc is pointless, and is wrong if we executed a 2-byte
compressed breakpoint. This plus a corresponding gdb patch allows
compressed breakpoints to work in gdb. Gdb maintainers have already
agreed that this is the right approach.
Signed-off-by: Jim Wilson <jimw@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/kernel')
-rw-r--r-- | arch/riscv/kernel/traps.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 81a1952015a6..24a9333dda2c 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -138,7 +138,6 @@ asmlinkage void do_trap_break(struct pt_regs *regs) #endif /* CONFIG_GENERIC_BUG */ force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)(regs->sepc), current); - regs->sepc += 0x4; } #ifdef CONFIG_GENERIC_BUG |