Dmitry V. Levin
e2fb0bb2cf
* native_defs.h: New file. * syscall.c: Include it. * mpers_type.h [!IN_MPERS] (MPERS_DEFS): Change to "native_defs.h". * defs.h (MPERS_PRINTER_NAME): Remove. [SUPPORTED_PERSONALITIES > 1] (MPERS_PRINTER_NAME, printers): Move ... * Makefile.am (printers.h): ... here. Add macro definitions for mpers printers. (m%_defs.h): Add redefinition of MPERS_PRINTER_NAME and inclusion of "$(mpers_PREFIX)printer_decls.h". (strace_SOURCES): Add native_defs.h. * README-mpers: Update instructions for using mpers printers. * ipc_msg.c (tprint_msgsnd, tprint_msgrcv): Call tprint_msgbuf directly. * mq.c (sys_mq_open, mq_getsetattr): Call printmqattr directly. * process.c (sys_ptrace): Call printsiginfo_at directly. * signal.c (print_sigqueueinfo, sys_rt_sigtimedwait): Likewise. * resource.c (sys_getrusage): Call printrusage directly. * utimes.c (sys_utimensat): Call print_timespec_utime_pair directly. (sys_utimes, sys_futimesat): Call print_timeval_pair directly. * wait.c (printwaitn): Call printrusage directly. (sys_waitid): Call printrusage and printsiginfo_at directly.
15 lines
650 B
Plaintext
15 lines
650 B
Plaintext
To use mpers functionality, one should:
|
|
* typedef all of the target types which are compound and not typedefed
|
|
already;
|
|
* for each target type, include DEF_MPERS_TYPE(target_type_t), these can
|
|
be included conditionally;
|
|
* include MPERS_DEFS once;
|
|
* before inclusion of MPERS_DEFS include all important headers
|
|
(containing definitions of these types or other behaviour-affecting
|
|
defines);
|
|
* printers should be defined
|
|
as MPERS_PRINTER_DECL(return_type, function_name)(args),
|
|
inside files that include MPERS_DEFS these printers should be called
|
|
as MPERS_FUNC_NAME(function_name)(args), in other files
|
|
they should be called just as function_name(args).
|