openrisc: fix trap for debugger breakpoint signalling
authorStafford Horne <shorne@gmail.com>
Sat, 17 Oct 2020 21:37:01 +0000 (06:37 +0900)
committerStafford Horne <shorne@gmail.com>
Wed, 11 Nov 2020 21:32:20 +0000 (06:32 +0900)
commit28b852b1dc351efc6525234c5adfd5bc2ad6d6e1
tree31cdaed08f97454cf958da7b8335e9bb9426a240
parentf81cc5ac8c2b5c0e2e190ea181ab2b9e5cf8497d
openrisc: fix trap for debugger breakpoint signalling

I have been working on getting native Linux GDB support working for the
OpenRISC port.  The trap signal handler here was wrong in a few ways.
During trap handling address (from the EEAR register) is not set by the
CPU, so it is not correct to use here.  We want to use trap as a
break-point so use TRAP_BRKPT.  Adding 4 to the pc was incorrect and
causing GDB to think the breakpoint was not hit.

Fixing these allows GDB to work now.

Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/traps.c