ARM: kprobes: Add Thumb breakpoint support
authorJon Medhurst <tixy@yxit.co.uk>
Tue, 19 Apr 2011 16:18:35 +0000 (17:18 +0100)
committerTixy <tixy@medhuaa1.miniserver.com>
Wed, 13 Jul 2011 17:32:42 +0000 (17:32 +0000)
commitaceb487ab2ea0dca43f5131e456f45bc9f8c1bed
treeef146fd590795a13a477961afb60f5468d38f566
parent856bc356394a28edb8c388e31212f6ceb0a04ce6
ARM: kprobes: Add Thumb breakpoint support

Extend the breakpoint insertion and catching functions to support Thumb
code.

As breakpoints are no longer of a fixed size, the flush_insns macro
is modified to take a size argument instead of an instruction count.

Note, we need both 16- and 32-bit Thumb breakpoints, because if we
were to use a 16-bit breakpoint to replace a 32-bit instruction which
was in an IT block, and the condition check failed, then the breakpoint
may not fire (it's unpredictable behaviour) and the CPU could then try
and execute the second half of the 32-bit Thumb instruction.

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