Files
linux/arch/arc/kernel
Vineet Gupta 4b3ea63f5a ARC: Ignore ptrace SETREGSET request for synthetic register "stop_pc"
commit 5b24282846 upstream.

ARCompact TRAP_S insn used for breakpoints, commits before exception is
taken (updating architectural PC). So ptregs->ret contains next-PC and
not the breakpoint PC itself. This is different from other restartable
exceptions such as TLB Miss where ptregs->ret has exact faulting PC.
gdb needs to know exact-PC hence ARC ptrace GETREGSET provides for
@stop_pc which returns ptregs->ret vs. EFA depending on the
situation.

However, writing stop_pc (SETREGSET request), which updates ptregs->ret
doesn't makes sense stop_pc doesn't always correspond to that reg as
described above.

This was not an issue so far since user_regs->ret / user_regs->stop_pc
had same value and both writing to ptregs->ret was OK, needless, but NOT
broken, hence not observed.

With gdb "jump", they diverge, and user_regs->ret updating ptregs is
overwritten immediately with stop_pc, which this patch fixes.

Reported-by: Anton Kolesov <akolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-18 07:45:45 -07:00
..
2013-05-07 13:43:54 +05:30
2013-02-15 23:16:02 +05:30
2013-02-26 14:25:18 +05:30
2013-03-11 19:01:09 +05:30
2013-04-09 12:21:14 +05:30
2013-04-08 17:39:23 +02:00
2013-04-08 17:39:23 +02:00