[RFC] [PATCH 0/4] ARM: kprobes: Infrastructure to support probes in Thumb code
Nicolas Pitre
nicolas.pitre at linaro.org
Mon Mar 21 20:06:06 UTC 2011
On Mon, 21 Mar 2011, Tixy wrote:
> On Mon, 2011-03-21 at 12:01 -0400, Nicolas Pitre wrote:
> > Why not always using a 16-bit Thumb breakpoint instruction even in place
> > of a 32-bit Thumb instruction? This way you sidestep all the issues
> > about atomically updating the instruction across two words. The
> > instruction to emulate might still be 32-bit and therefore pc would be
> > advanced appropriately.
>
> If the breakpoint is in an IT block and its execution condition is false
> then the breakpoint may not cause an exception and the CPU will go on
> and try and execute the other half of the instruction.
yeah... bummer.
In this case this might be a worthwhile optimization to not do the heavy
dance when the instruction is word aligned.
Nicolas
More information about the linaro-kernel
mailing list