]> granicus.if.org Git - strace/commitdiff
Move subcall decoding configuration out of the common code
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 7 May 2013 14:38:01 +0000 (18:38 +0400)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 7 May 2013 16:06:58 +0000 (16:06 +0000)
* Makefile.am (EXTRA_DIST): Add linux/subcall.h.
* linux/syscall.h (SYS_socket_subcall): Remove.
(SYS_socket_nsubcalls, SYS_ipc_subcall, SYS_ipc_nsubcalls): Move to ...
* linux/subcall.h: ... new file.
* linux/arm/syscallent.h: Define SYS_socket_subcall, include subcall.h.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.

Suggested by Mike Frysinger and Chris Metcalf.

12 files changed:
Makefile.am
linux/arm/syscallent.h
linux/i386/syscallent.h
linux/m68k/syscallent.h
linux/powerpc/syscallent.h
linux/s390/syscallent.h
linux/s390x/syscallent.h
linux/sh/syscallent.h
linux/sh64/syscallent.h
linux/sparc/syscallent.h
linux/subcall.h [new file with mode: 0644]
linux/syscall.h

index 639430d4b58cfd7b337a4279ed7ef12501ca3f22..99d9eaf5fd9f8d7652e98d0d3c31921495f0bee9 100644 (file)
@@ -151,6 +151,7 @@ EXTRA_DIST =                                \
        linux/sparc64/syscallent.h      \
        linux/sparc64/syscallent1.h     \
        linux/sparc64/syscallent2.h     \
+       linux/subcall.h                 \
        linux/syscall.h                 \
        linux/tile/ioctlent.h.in        \
        linux/tile/syscallent.h         \
index b1fd3708761051aad6a5900efb954892de3b6284..8976a82c0ea38a5cfdbb49facb10ee603726756f 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 397 */
        { 5,    0,      NULL,                   NULL            }, /* 398 */
        { 5,    0,      NULL,                   NULL            }, /* 399 */
-# if SYS_socket_subcall != 400
-#  error fix me
-# endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index 8a1d6179e400203a184b92ea3e7845267a22b60a..7e40f32dd55b488e8481809c6428326147f981fa 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 397 */
        { 5,    0,      NULL,                   NULL            }, /* 398 */
        { 5,    0,      NULL,                   NULL            }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index b872a090df872a1a9578f6e0a3a33da631e32e88..222a5220b4b05c5cbc91dcac59b4250693de59fb 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 397 */
        { 5,    0,      NULL,                   NULL            }, /* 398 */
        { 5,    0,      NULL,                   NULL            }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index 8db525dd086139e80d4d36bffbbfd99bd96ba4b5..ada58f7453cce22d4f5ed6eb6f7749ad8c022bd9 100644 (file)
        { 5,    0,      NULL,                   NULL                    }, /* 397 */
        { 5,    0,      NULL,                   NULL                    }, /* 398 */
        { 5,    0,      NULL,                   NULL                    }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index c68362ec153aaa0cf0ac06cb002dec932a24cb9e..8faeba6ec0822e494dd1a6e9836433ce00a373cc 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 397 */
        { 5,    0,      NULL,                   NULL            }, /* 398 */
        { 5,    0,      NULL,                   NULL            }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index 05b296cf0959ce65cdd4a2b3381d60fde9a78d4d..1b19a41f232434bf46f54f514b216e33ab957313 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 397 */
        { 5,    0,      NULL,                   NULL            }, /* 398 */
        { 5,    0,      NULL,                   NULL            }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index 577a4f65d31a7581c1511c7bc76a09a52bf4bc5b..af06962903ebbd27fa040284758ad78f5703677c 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 397 */
        { 5,    0,      NULL,                   NULL            }, /* 398 */
        { 5,    0,      NULL,                   NULL            }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index 246417dc954f559a32f4de535d46f8ce75b08079..fa9c0aa3d8cbe80e4e7dedede850b7b7b47714a8 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 397 */
        { 5,    0,      NULL,                   NULL            }, /* 398 */
        { 5,    0,      NULL,                   NULL            }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall     400
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 400 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 401 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 402 */
index de4648071c189562e7441b4986624141a403561b..dc000964567c08555acf31259a325cf806af75ff 100644 (file)
        { 5,    0,      NULL,                   NULL            }, /* 350 */
        { 5,    0,      NULL,                   NULL            }, /* 351 */
        { 5,    0,      NULL,                   NULL            }, /* 352 */
-#if SYS_socket_subcall != 353
- #error fix me
-#endif
+#define SYS_socket_subcall     353
+#include "subcall.h"
        { 6,    0,      printargs,              "socket_subcall"}, /* 353 */
        { 3,    TN,     sys_socket,             "socket"        }, /* 354 */
        { 3,    TN,     sys_bind,               "bind"          }, /* 355 */
diff --git a/linux/subcall.h b/linux/subcall.h
new file mode 100644 (file)
index 0000000..54f7fca
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef SYS_socket_subcall
+# error SYS_socket_subcall is not defined
+#endif
+#define SYS_socket_nsubcalls   20
+#define SYS_ipc_subcall                ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
+#define SYS_ipc_nsubcalls      25
index 0c87fa678d44281c3db6f36407c4475a8044b407..f6afcac049731bfa89c42bfe379d79b960f47cbf 100644 (file)
@@ -313,30 +313,6 @@ int sys_osf_utimes();
 int sys_osf_wait4();
 #endif
 
-#if defined ALPHA \
- || defined __ARM_EABI__ \
- || defined BFIN \
- || defined HPPA \
- || defined METAG \
- || defined MIPS \
- || defined TILE \
- || defined XTENSA
-/*
- * This architecture does not have a socketcall or ipc subcall,
- * it has dedicated syscalls instead, so there is no need
- * to implement socket or ipc subcall decoding.
- */
-#else
-# if defined SPARC || defined SPARC64
-#  define SYS_socket_subcall   353
-# else
-#  define SYS_socket_subcall   400
-# endif
-# define SYS_socket_nsubcalls  20
-# define SYS_ipc_subcall       ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
-# define SYS_ipc_nsubcalls     25
-#endif
-
 #if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
 int sys_getpagesize();
 #endif