aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2016-01-21 11:40:38 +0100
committerKoen Kooi <koen.kooi@linaro.org>2016-01-21 11:40:38 +0100
commita67620046e260df9d0330f1c81e01461e0538a1f (patch)
tree0b279aee513c19a5139a666204ba6072713037dc
parent346c76e9fa41b5f11f76193a6762da288fa48efe (diff)
strace: update patch to match arch refactoring
Change-Id: I5a2c903d9f9f0c0475804ba369fc9f1738ce4213 Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-rw-r--r--meta-bigendian/recipes-devtools/strace/strace/strace-4.8-arm-be8.patch34
1 files changed, 22 insertions, 12 deletions
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 <koen.kooi@linaro.org>
+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 <victor.kamensky@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
+[ Rediffed against newer strace 20160121 ]
+Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
- 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
+