summaryrefslogtreecommitdiff
path: root/meta/packages/strace/strace-4.5.14/arm-eabi.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-23 00:22:05 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-23 00:22:05 +0000
commit37568a71d07060976b5a3c330ab6f4c2c7e1a87e (patch)
tree9957336a057303677b2ce61d2a6cd01b55549eda /meta/packages/strace/strace-4.5.14/arm-eabi.patch
parentae60cc23f955d0f8feb68a46ef301b4f1e682a08 (diff)
downloadopenembedded-core-37568a71d07060976b5a3c330ab6f4c2c7e1a87e.tar.gz
openembedded-core-37568a71d07060976b5a3c330ab6f4c2c7e1a87e.tar.bz2
openembedded-core-37568a71d07060976b5a3c330ab6f4c2c7e1a87e.tar.xz
openembedded-core-37568a71d07060976b5a3c330ab6f4c2c7e1a87e.zip
Add strace 4.5.14 (with EABI fixes)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1087 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/strace/strace-4.5.14/arm-eabi.patch')
-rw-r--r--meta/packages/strace/strace-4.5.14/arm-eabi.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/packages/strace/strace-4.5.14/arm-eabi.patch b/meta/packages/strace/strace-4.5.14/arm-eabi.patch
new file mode 100644
index 000000000..53e27f8ce
--- /dev/null
+++ b/meta/packages/strace/strace-4.5.14/arm-eabi.patch
@@ -0,0 +1,65 @@
+2006-03-30 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * process.c (change_syscall): Add ARM support.
+ * syscall.c (get_scno): Handle ARM EABI.
+
+Index: strace/process.c
+===================================================================
+--- strace.orig/process.c 2006-03-30 17:36:14.000000000 -0500
++++ strace/process.c 2006-03-30 17:44:16.000000000 -0500
+@@ -694,6 +694,16 @@ int new;
+ 0x100000 | new) < 0)
+ return -1;
+ return 0;
++#elif defined(ARM)
++ /* Some kernels support this, some (pre-2.6.16 or so) don't. */
++# ifndef PTRACE_SET_SYSCALL
++# define PTRACE_SET_SYSCALL 23
++# endif
++
++ if (ptrace (PTRACE_SET_SYSCALL, tcp->pid, 0, new) != 0)
++ return -1;
++
++ return 0;
+ #else
+ #warning Do not know how to handle change_syscall for this architecture
+ #endif /* architecture */
+Index: strace/syscall.c
+===================================================================
+--- strace.orig/syscall.c 2006-03-30 17:36:14.000000000 -0500
++++ strace/syscall.c 2006-03-30 17:44:16.000000000 -0500
+@@ -1108,16 +1108,25 @@ struct tcb *tcp;
+ return 0;
+ }
+
+- if ((scno & 0x0ff00000) != 0x0f900000) {
+- fprintf(stderr, "syscall: unknown syscall trap 0x%08lx\n",
+- scno);
+- return -1;
+- }
++ /* Handle the EABI syscall convention. We do not
++ bother converting structures between the two
++ ABIs, but basic functionality should work even
++ if strace and the traced program have different
++ ABIs. */
++ if (scno == 0xef000000) {
++ scno = regs.ARM_r7;
++ } else {
++ if ((scno & 0x0ff00000) != 0x0f900000) {
++ fprintf(stderr, "syscall: unknown syscall trap 0x%08lx\n",
++ scno);
++ return -1;
++ }
+
+- /*
+- * Fixup the syscall number
+- */
+- scno &= 0x000fffff;
++ /*
++ * Fixup the syscall number
++ */
++ scno &= 0x000fffff;
++ }
+ }
+
+ if (tcp->flags & TCB_INSYSCALL) {