]> granicus.if.org Git - strace/blob - bjm.c
Update sys_createmodule and sys_initmodule
[strace] / bjm.c
1 #include "defs.h"
2
3 #if defined(LINUX)
4
5 #include <fcntl.h>
6 #include <sys/stat.h>
7 #include <sys/time.h>
8 #include <sys/wait.h>
9 #include <sys/resource.h>
10 #include <sys/utsname.h>
11 #include <sys/user.h>
12 #include <sys/syscall.h>
13 #include <signal.h>
14 #include <linux/module.h>
15
16 /* WTA: #define these here: since Debian uses glibc2's includefiles
17  * instead of the kernel includes we miss these otherwise.
18  */
19
20 #if !defined(QM_MODULES)
21 #define QM_MODULES      1
22 #define QM_DEPS         2
23 #define QM_REFS         3
24 #define QM_SYMBOLS      4
25 #define QM_INFO         5
26 #endif
27
28 static struct xlat which[] = {
29         { 0,                    "0"                             },
30         { QM_MODULES,   "QM_MODULES"    },
31         { QM_DEPS,              "QM_DEPS"               },
32         { QM_REFS,              "QM_REFS"               },
33         { QM_SYMBOLS,   "QM_SYMBOLS"    },
34         { QM_INFO,              "QM_INFO"               },
35         { 0,                    NULL                    },
36 };
37
38 int
39 sys_query_module(tcp)
40 struct tcb *tcp;
41 {
42
43         if (entering(tcp)) {
44                 printstr(tcp, tcp->u_arg[0], -1);
45                 tprintf(", ");
46                 printxval(which, tcp->u_arg[1], "L_???");
47                 tprintf(", ");
48                 printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]);
49                 tprintf(", %#lx", tcp->u_arg[4]);
50         }
51         return 0;
52 }
53
54 #endif /* LINUX */
55