ARM: kprobes: Add hooks to override singlestep()
authorJon Medhurst <tixy@yxit.co.uk>
Thu, 9 Jun 2011 11:11:27 +0000 (12:11 +0100)
committerTixy <tixy@medhuaa1.miniserver.com>
Wed, 13 Jul 2011 17:32:42 +0000 (17:32 +0000)
commitc6a7d97d57ef41477a85f4c0f48ea5243132ee1f
tree8803e688ba6c016e9f05de460d2571576fed2da8
parent3b26945597d5eff5d428a268c9d109338fce801e
ARM: kprobes: Add hooks to override singlestep()

When a probe fires we must single-step the instruction which was
replaced by a breakpoint. As the steps to do this vary between ARM and
Thumb instructions we need a way to customise single-stepping.

This is done by adding a new hook called insn_singlestep to
arch_specific_insn which is initialised by the instruction decoding
functions.

These single-step hooks must update PC and call the instruction handler.
For Thumb instructions an additional step of updating ITSTATE is needed.
We do this after calling the handler because some handlers will need to
test if they are running in an IT block.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
arch/arm/include/asm/kprobes.h
arch/arm/kernel/kprobes-arm.c
arch/arm/kernel/kprobes-thumb.c
arch/arm/kernel/kprobes.c