From a67620046e260df9d0330f1c81e01461e0538a1f Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 21 Jan 2016 11:40:38 +0100 Subject: strace: update patch to match arch refactoring Change-Id: I5a2c903d9f9f0c0475804ba369fc9f1738ce4213 Signed-off-by: Koen Kooi --- .../strace/strace/strace-4.8-arm-be8.patch | 34 ++++++++++++++-------- 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'meta-bigendian') diff --git a/meta-bigendian/recipes-devtools/strace/strace/strace-4.8-arm-be8.patch b/meta-bigendian/recipes-devtools/strace/strace/strace-4.8-arm-be8.patch index bda48074..8998fe75 100644 --- a/meta-bigendian/recipes-devtools/strace/strace/strace-4.8-arm-be8.patch +++ b/meta-bigendian/recipes-devtools/strace/strace/strace-4.8-arm-be8.patch @@ -1,4 +1,7 @@ -strace: fix system call matching code in get_scno for be8 arm +From 9a87af95e77f23f6652b3a63aca5157b7f5993b5 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 21 Jan 2016 11:39:16 +0100 +Subject: [PATCH] strace: fix system call matching code in get_scno for be8 arm on ARM V7 operating in big endian mode strace does not work: @@ -12,26 +15,33 @@ to byteswap it before that. Signed-off-by: Victor Kamensky Signed-off-by: Riku Voipio +[ Rediffed against newer strace 20160121 ] +Signed-off-by: Koen Kooi --- - syscall.c | 10 ++++++++++ + linux/arm/get_scno.c | 10 ++++++++++ 1 file changed, 10 insertions(+) ---- a/syscall.c -+++ b/syscall.c -@@ -1374,6 +1374,16 @@ get_scno(struct tcb *tcp) +diff --git a/linux/arm/get_scno.c b/linux/arm/get_scno.c +index 23a167c..c8125ef 100644 +--- a/linux/arm/get_scno.c ++++ b/linux/arm/get_scno.c +@@ -46,6 +46,16 @@ arch_get_scno(struct tcb *tcp) scno = ptrace(PTRACE_PEEKTEXT, tcp->pid, (void *)(arm_regs.ARM_pc - 4), NULL); if (errno) return -1; + +#if defined(__ARMEB__) && defined(__ARM_ARCH_7A__) -+ /* We running big endian arm on ARMv7: instructions are -+ * in little endian form so we need to byteswap it. Note -+ * on older ARM like V5 Xscale code is in big endian form -+ * byte swap is not needed in this case. I.e be8 vs be32. -+ */ -+ scno = __builtin_bswap32(scno); ++ /* We running big endian arm on ARMv7: instructions are ++ * in little endian form so we need to byteswap it. Note ++ * on older ARM like V5 Xscale code is in big endian form ++ * byte swap is not needed in this case. I.e be8 vs be32. ++ */ ++ scno = __builtin_bswap32(scno); +#endif /* __ARMEB__ && __ARM_ARCH_7A__ */ + /* EABI syscall convention? */ - if (scno != 0xef000000) { + if ((unsigned long) scno != 0xef000000) { /* No, it's OABI */ +-- +2.4.3 + -- cgit v1.2.3