kernel-ark/arch/arm
Nikola Valerjev 22f975f4ff [ARM] 3200/1: Singlestep over ARM BX and BLX instructions using ptrace fix
Patch from Nikola Valerjev

Single stepping an application using ptrace() fails over ARM instructions BX and BLX.

Steps to reproduce:

Compile and link the following files

main.c
-----
void foo();
int main() {
    foo();
    return 0;
}

foo.s
-----
	.text
	.globl foo
foo:
	BX LR

Using ptrace() functionality, run to main(), and start singlestepping.
Singlestep over \"BX LR\" instruction won\'t transfer the control back
to main, but run the code to completion.

This problems seems to be in the function get_branch_address() in
arch/arm/kernel/ptrace.c. The function doesn\'t seem to recognize BX
and BLX instructions as branches. BX and BLX instructions can be used
to convert from ARM to Thumb mode if the target address has the low
bit set. However, they are also perfectly legal in the ARM only mode.
Although other things in the kernel seem to indicate that only ARM
mode is accepted (and not Thumb), many compilers will generate BX
and BLX instructions even when generating ARM only code.

Signed-off-by: Nikola Valerjev <nikola@ghs.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-10 11:59:15 +00:00
..
boot
common
configs [ARM] 3188/1: Add missing i2c dependency for Akita 2005-12-01 15:52:47 +00:00
kernel [ARM] 3200/1: Singlestep over ARM BX and BLX instructions using ptrace fix 2005-12-10 11:59:15 +00:00
lib
mach-aaec2000
mach-clps711x
mach-clps7500 [ARM] Shut up gcc warning in clps7500 core.c 2005-11-21 17:03:15 +00:00
mach-ebsa110
mach-epxa10db
mach-footbridge
mach-h720x
mach-imx
mach-integrator
mach-iop3xx
mach-ixp4xx [ARM] Fix IXDP425 setup bug 2005-12-01 15:50:35 +00:00
mach-ixp2000
mach-l7200
mach-lh7a40x
mach-omap1
mach-omap2
mach-pxa [ARM] 3188/1: Add missing i2c dependency for Akita 2005-12-01 15:52:47 +00:00
mach-realview [ARM] Realview core.c does not need mach-types.h 2005-11-25 15:57:21 +00:00
mach-rpc
mach-s3c2410
mach-sa1100 [ARM] Shut up gcc warning in assabet.c 2005-11-21 17:01:13 +00:00
mach-shark
mach-versatile
mm [ARM SMP] Disable lazy flush_dcache_page for SMP 2005-11-30 16:02:54 +00:00
nwfpe
oprofile
plat-omap
tools [ARM] Update mach-types 2005-11-25 15:59:01 +00:00
vfp
Kconfig
Kconfig.debug
Makefile