ipc.c: split into separate files
In preparation for upcoming mpers-related changes,
split ipc.c into independent groups of parsers.
* ipc_defs.h: New file.
* ipc_msg.c: Likewise.
* ipc_msgctl.c: Likewise.
* ipc_sem.c: Likewise.
* ipc_shm.c: Likewise.
* ipc_shmctl.c: Likewise.
* mq.c: Likewise.
* print_mq_attr.c: Likewise.
* print_msgbuf.c: Likewise.
* ipc.c: Remove.
(sys_mq_open, sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify,
sys_mq_getsetattr): Move to mq.c.
(sys_msgget, tprint_msgsnd, sys_msgsnd, tprint_msgrcv, sys_msgrcv): Move
to ipc_msg.c.
(sys_msgctl): Move to ipc_msgctl.c.
(tprint_sembuf, tprint_sembuf_array, sys_semop, sys_semtimedop,
sys_semget, syssemctl): Move to ipc_sem.c.
(sys_shmget, sys_shmat, sys_shmdt): Move to ipc_shm.c.
(sys_shmctl): Move to ipc_shmctl.c.
(printmqattr): Move to print_mq_attr.c.
(tprint_msgbuf): Move to print_msgbuf.c.
(IPC_64, PRINTCTL): Move to ipc_defs.h.
* defs.h (struct xlat resource_flags): New prototype.
* Makefile.am (strace_SOURCES): Remove ipc.c. Add ipc_defs.h, mq.c,
ipc_msg.c, ipc_msgctl.c, ipc_sem.c, ipc_shm.c, ipc_shmctl.c,
print_mq_attr.c, and print_msgbuf.c.
diff --git a/defs.h b/defs.h
index e8a2a0d..9059026 100644
--- a/defs.h
+++ b/defs.h
@@ -348,6 +348,7 @@
extern const struct xlat at_flags[];
extern const struct xlat open_access_modes[];
extern const struct xlat open_mode_flags[];
+extern const struct xlat resource_flags[];
extern const struct xlat whence_codes[];
/* Format of syscall return values */
@@ -383,6 +384,8 @@
#define STACKTRACE_CAPTURE_ON_ENTER 01000 /* Capture stacktrace on "entering" stage */
#define TRACE_INDIRECT_SUBCALL 02000 /* Syscall is an indirect socket/ipc subcall. */
+#define indirect_ipccall(tcp) (tcp->s_ent->sys_flags & TRACE_INDIRECT_SUBCALL)
+
#if defined(ARM) || defined(AARCH64) \
|| defined(I386) || defined(X32) || defined(X86_64) \
|| defined(IA64) \
@@ -579,6 +582,7 @@
extern char *sprinttv(char *, struct tcb *, long, enum bitness_t, int special);
extern void print_timespec(struct tcb *, long);
extern void sprint_timespec(char *, struct tcb *, long);
+extern void printsigevent(struct tcb *tcp, long arg);
extern void printsiginfo_at(struct tcb *tcp, long addr);
extern void printfd(struct tcb *, int);
extern bool print_sockaddr_by_inode(const unsigned long, const char *);