]> granicus.if.org Git - strace/commitdiff
2008-01-25 Bruna Moreira <bruna.moreira@indt.org>
authorRoland McGrath <roland@redhat.com>
Tue, 20 May 2008 01:35:55 +0000 (01:35 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 20 May 2008 01:35:55 +0000 (01:35 +0000)
* defs.h [ARM]: Define SUPPORTED_PERSONALITIES to 2.
* syscall.c (get_scno) [ARM]: Add support for architecture specific
syscalls.
* linux/arm/syscallent.h: Update network syscalls list.
* linux/arm/syscallent1.h: New file. Add new architecture specific
syscalls.
* linux/arm/errnoent1.h: New file.
* linux/arm/ioctlent1.h: New file.
* linux/arm/signalent1.h: New file.
Fixes Debian#441000.

defs.h
linux/arm/errnoent1.h [new file with mode: 0644]
linux/arm/ioctlent1.h [new file with mode: 0644]
linux/arm/signalent1.h [new file with mode: 0644]
linux/arm/syscallent.h
linux/arm/syscallent1.h [new file with mode: 0644]
syscall.c

diff --git a/defs.h b/defs.h
index e8191748ee61a451bc3d88f9c42fc72df525094e..0ac733f3ec8338d9ff9efa0fe47d0b9107d22515 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -228,6 +228,13 @@ extern int ptrace();
 #define PERSONALITY1_WORDSIZE 4
 #endif
 
+#ifdef ARM
+#undef SUPPORTED_PERSONALITIES
+#define SUPPORTED_PERSONALITIES 2
+#define PERSONALITY0_WORDSIZE 4
+#define PERSONALITY1_WORDSIZE 4
+#endif
+
 #ifdef SVR4
 #ifdef HAVE_MP_PROCFS
 extern int mp_ioctl (int f, int c, void *a, int s);
diff --git a/linux/arm/errnoent1.h b/linux/arm/errnoent1.h
new file mode 100644 (file)
index 0000000..a894827
--- /dev/null
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files.  */
+#include "../errnoent.h"
diff --git a/linux/arm/ioctlent1.h b/linux/arm/ioctlent1.h
new file mode 100644 (file)
index 0000000..a44b0ae
--- /dev/null
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files.  */
+#include "../ioctlent.h"
diff --git a/linux/arm/signalent1.h b/linux/arm/signalent1.h
new file mode 100644 (file)
index 0000000..5c18d98
--- /dev/null
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files.  */
+#include "../signalent.h"
index 8718cf70b3e50b636dcca767631ae4533d433c91..b70dac12ca3ed849f8c62c516d707e1f70cae384 100644 (file)
        { 2,    0,      sys_mq_notify,          "mq_notify"     }, /* 278 */
        { 3,    0,      sys_mq_getsetattr,      "mq_getsetattr" }, /* 279 */
        { 5,    TP,     sys_waitid,             "waitid"        }, /* 280 */
-       { 5,    0,      printargs,              "SYS_281"       }, /* 281 */
-       { 5,    0,      printargs,              "SYS_282"       }, /* 282 */
-       { 5,    0,      printargs,              "SYS_283"       }, /* 283 */
-       { 5,    0,      printargs,              "SYS_284"       }, /* 284 */
-       { 5,    0,      printargs,              "SYS_285"       }, /* 285 */
-       { 5,    0,      printargs,              "SYS_286"       }, /* 286 */
-       { 5,    0,      printargs,              "SYS_287"       }, /* 287 */
-       { 5,    0,      printargs,              "SYS_288"       }, /* 288 */
-       { 5,    0,      printargs,              "SYS_289"       }, /* 289 */
-       { 5,    0,      printargs,              "SYS_290"       }, /* 290 */
-       { 5,    0,      printargs,              "SYS_291"       }, /* 291 */
-       { 5,    0,      printargs,              "SYS_292"       }, /* 292 */
-       { 5,    0,      printargs,              "SYS_293"       }, /* 293 */
-       { 5,    0,      printargs,              "SYS_294"       }, /* 294 */
-       { 5,    0,      printargs,              "SYS_295"       }, /* 295 */
-       { 5,    0,      printargs,              "SYS_296"       }, /* 296 */
-       { 5,    0,      printargs,              "SYS_297"       }, /* 297 */
+       { 3,    TN,     sys_socket,             "socket"        }, /* 281 */
+       { 3,    TN,     sys_bind,               "bind"          }, /* 282 */
+       { 3,    TN,     sys_connect,            "connect"       }, /* 283 */
+       { 2,    TN,     sys_listen,             "listen"        }, /* 284 */
+       { 3,    TN,     sys_accept,             "accept"        }, /* 285 */
+       { 3,    TN,     sys_getsockname,        "getsockname"   }, /* 286 */
+       { 3,    TN,     sys_getpeername,        "getpeername"   }, /* 287 */
+       { 4,    TN,     sys_socketpair,         "socketpair"    }, /* 288 */
+       { 4,    TN,     sys_send,               "send"          }, /* 289 */
+       { 6,    TN,     sys_sendto,             "sendto"        }, /* 290 */
+       { 4,    TN,     sys_recv,               "recv"          }, /* 291 */
+       { 6,    TN,     sys_recvfrom,           "recvfrom"      }, /* 292 */
+       { 2,    TN,     sys_shutdown,           "shutdown"      }, /* 293 */
+       { 5,    TN,     sys_setsockopt,         "setsockopt"    }, /* 294 */
+       { 5,    TN,     sys_getsockopt,         "getsockopt"    }, /* 295 */
+       { 3,    TN,     sys_sendmsg,            "sendmsg"       }, /* 296 */
+       { 3,    TN,     sys_recvmsg,            "recvmsg"       }, /* 297 */
        { 5,    0,      printargs,              "SYS_298"       }, /* 298 */
        { 5,    0,      printargs,              "SYS_299"       }, /* 299 */
        { 5,    0,      printargs,              "SYS_300"       }, /* 300 */
diff --git a/linux/arm/syscallent1.h b/linux/arm/syscallent1.h
new file mode 100644 (file)
index 0000000..0978e9f
--- /dev/null
@@ -0,0 +1,7 @@
+/* ARM specific syscalls */
+       { 5,    0,      printargs,              "SYS_0"                 }, /* 0 */
+       { 5,    0,      printargs,              "breakpoint"            }, /* 1 */
+       { 5,    0,      printargs,              "cacheflush"            }, /* 2 */
+       { 5,    0,      printargs,              "usr26"                 }, /* 3 */
+       { 5,    0,      printargs,              "usr32"                 }, /* 4 */
+       { 5,    0,      printargs,              "set_tls"               }, /* 5 */
index e699c618f207f418d4a485342c83581f288bcfe2..a2d26d39b7aa2aad3c6b53e7d32998ba87a07d21 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -1055,6 +1055,14 @@ struct tcb *tcp;
                                scno &= 0x000fffff;
                        }
                }
+               if (scno & 0x0f0000) {
+                       /*
+                        * Handle ARM specific syscall
+                        */
+                       set_personality(1);
+                       scno &= 0x0000ffff;
+               } else
+                       set_personality(0);
 
                if (tcp->flags & TCB_INSYSCALL) {
                        fprintf(stderr, "pid %d stray syscall entry\n", tcp->pid);