Commit Graph

11 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
9d095c7860 Add copyright headers 2017-05-22 17:33:51 +00:00
7fa3d78319 Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t
Remove temporary types created for transition from long
to kernel_ulong_t.

Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'

* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
2016-12-26 10:43:34 +00:00
3f8d42d94f printrusage*: change tracee address argument type from long to kernel_ureg_t
* defs.h [ALPHA] (printrusage32): Change address argument type
from long to kernel_ureg_t.
* printrusage.c (printrusage): Likewise.
[ALPHA] (printrusage32): Likewise.
* wait.c (printwaitn): Change the type of tracee address argument
of print_rusage from long to kernel_ureg_t.
2016-12-25 11:32:44 +00:00
7491519823 alpha: print struct timeval32 consistently
* defs.h [ALPHA] (timeval32_t): New type.
[ALPHA] (print_timeval32_t): New prototype.
* print_timeval.c [ALPHA] (timeval32_t): Remove.
[ALPHA] (print_timeval32_t): Remove static keyword.
* printrusage.c [ALPHA] (printrusage32): Use timeval32_t instead
of local definition of struct timeval32.  Use print_timeval32_t.
2016-11-28 04:21:11 +00:00
70864ce6e0 Print struct timeval consistently
Use print_struct_timeval interface to print struct timeval.

* print_timeval.c (print_struct_timeval): New mpers printer.
* print_timex.c (print_timex): Use it.
* printrusage.c (printrusage): Likewise.
* v4l2.c (print_v4l2_buffer): Likewise.
* tests/getrusage.c (main): Print tv_sec and tv_usec fields as signed.
* tests/waitid.c (sprint_rusage): Likewise.

Suggested-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2016-11-28 04:07:37 +00:00
Eugene Syromyatnikov
151d1d158c Fix omission of field names in printers of timeval structure
* print_time.c (time_fmt): Remove.
(timeval_fmt): New constant.
(print_timeval_t, sprint_timeval, print_timeval32_t, sprint_timeval32):
Use it instead of time_fmt.
* print_timex.c (print_timex): Print field names of the time field.
* printrusage.c (printrusage, printrusage32): Print field names
of ru_utime and ru_stime fields.
* tests/adjtimex.c (main): Add field names to expected output.
* tests/clock_nanosleep.c (main): Likewise.
* tests/futimesat.c (main): Likewise.
* tests/getrusage.c (main): Likewise.
* tests/nanosleep.c (main): Likewise.
* tests/oldselect.expected: Likewise.
* tests/utimes.c (main): Likewise.
* tests/wait4.c (sprint_rusage): Likewise.
* tests/waitid.c (sprint_rusage): Likewise.
* tests/xetitimer.c (main): Likewise.
* tests/xettimeofday.c (main): Likewise.
* tests/xselect.c (main): Likewise.
2016-11-26 00:40:53 +00:00
031fc80059 Rename widen_to_ull to zero_extend_signed_to_ull
* defs.h (widen_to_ull): Rename to zero_extend_signed_to_ull.
All callers changed.
* tests/tests.h: Likewise.
2016-08-23 00:24:10 +00:00
70ea46756e Fix sign extension issues in the parser of struct rusage
* printrusage.c (printrusage): Do not cast members of struct rusage
to type long, use widen_to_ull instead.
2016-06-10 01:29:46 +00:00
a8fce09e34 mpers: add support of conditionally compiled printers
We used to declare and define all printers marked with
MPERS_PRINTER_DECL, including ifdef'ed ones.  That approach left us
no way to conditionally compile mpersified printers, which was not
a problem until btrfs ioctls appeared on the horizon.

With this change, those mpersified printers that are not going
to be compiled are also won't be declared and won't be added to
struct_printers.

This is implemented by filtering all source files containing
MPERS_PRINTER_DECL markers through CPP.  As a nice side effect, this
also lifts an ugly requirement of writing all MPERS_PRINTER_DECL
declarations in a single line.

* README-mpers: Update description of MPERS_PRINTER_DECL syntax.
* defs.h [IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into
a recursive variadic macro.
[!IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into a variadic macro.
All callers changed.
* Makefile.am (mpers_preproc_files, mpers_printer_decl_pattern):
New variables.
(CLEANFILES): Add $(mpers_preproc_files).
(%.c.mpers.i): New rule.
(printers.h, %_printer_decls.h, %_printer_defs.h): Use
mpers_preproc_files instead of srcdir_mpers_source_files,
use mpers_printer_decl_pattern.
* .gitignore: Add /*.mpers.i.
2016-05-21 22:53:06 +00:00
6fb8c6feb9 Mpersify parsers of getrusage, waitpid, wait4, and waitid syscalls
Fix multiple personalities support in parsers of getrusage, waitpid,
wait4, and waitid syscalls by converting printrusage into a mpersified
printer.

* defs.h (printrusage): Remove.
* printrusage.c (rusage_t): New typedef.  Mpersify it.
(printrusage): Use it instead of struct rusage.
Wrap function name into MPERS_PRINTER_DECL.
* resource.c (sys_getrusage): Use mpersified printrusage.
* wait.c (printwaitn, sys_waitid): Likewise.
2015-08-28 08:46:23 +00:00
1e08a160f7 resource.c: move printrusage and printrusage32 to a separate file
* printrusage.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* resource.c (printrusage, [ALPHA] printrusage32): Move
to printrusage.c.
2015-07-18 00:01:40 +00:00