Commit Graph

13 Commits

Author SHA1 Message Date
73fa3d6822 Update copyright headers 2018-12-24 23:46:43 +00:00
b93d52fe3d Change the license of strace to LGPL-2.1-or-later
strace is now provided under the terms of the GNU Lesser General
Public License version 2.1 or later, see COPYING for more details.

strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00
Eugene Syromyatnikov
9d095c7860 Add copyright headers 2017-05-22 17:33:51 +00:00
7ffc669fb5 alpha: rename print_timeval32_pair to print_timeval32_utimes
This follows the rename of print_timeval_item to print_timeval_utimes.

* defs.h [ALPHA] (print_timeval32_pair): Rename
to print_timeval32_utimes.
* print_timeval.c [ALPHA] (print_timeval32_pair): Likewise.
* utimes.c [ALPHA] (SYS_FUNC(osf_utimes)): Replace print_timeval32_pair
with print_timeval32_utimes.
2017-04-16 23:27:08 +00:00
e5f236d341 Fix printing of inaccessible times argument of utimes and futimesat syscalls
When the whole pair of struct timeval structures cannot be fetched from
tracee's memory, print the address.  This behavior follows the kernel's
that uses copy_from_user for the whole pair, too.

* print_timeval.c (print_timeval_item): Remove.
(print_timeval_pair): Rename to print_timeval_utimes, all callers
updated.  Fetch the whole timeval_t array with a single
umove_or_printaddr call.
* tests/futimesat.c (main): Update expected output.
* tests/utimes.c (main): Likewise.
2017-04-16 18:13:27 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
f1e3a32045 Convert parser of struct timeval to new mpers infrastructure
* defs.h (printtv, printtv_special): Remove.
[ALPHA] (print_timeval32, print_timeval32_pair): New prototypes.
* print_time.c (print_timeval): New mpers printer.
[ALPHA] (print_timeval32, print_timeval32_pair): New functions.
* time.c (sys_gettimeofday, sys_settimeofday): Use print_timeval
instead of printtv.
[ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday):
Use print_timeval32 instead of printtv_bitness.
* utimes.c [ALPHA] (sys_osf_utimes): Use print_timeval32_pair
instead of printtv_bitness.
2015-09-19 04:04:49 +03:00
e2fb0bb2cf Simplify use of mpers printers
* 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.
2015-09-16 00:14:55 +00:00
b5a23ed381 Mpersify parsers of utimes, futimesat, and utimensat syscalls
Fix multiple personalities support in parsers of utimes, futimesat,
and utimensat syscalls by introducing two mpersified printers:
print_timeval_pair and print_timespec_utime_pair.

* print_time.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* utimes.c (decode_utimes): Remove.
(sys_utimes, sys_futimesat): Use print_timeval_pair instead
of decode_utimes.
(sys_utimensat): Use print_timespec_utime_pair instead of decode_utimes.
2015-08-28 08:46:23 +00:00
c9a199278b utimes.c: make use of RVAL_DECODED
* utimes.c (decode_utimes): Change to return void.
Update for RVAL_DECODED.
(sys_utimes, sys_futimesat, sys_utimensat, sys_osf_utimes):
Update callers.  Update for RVAL_DECODED.
2015-07-16 22:57:52 +00:00
e5fe1400c0 decode_utimes: enclose timespec array in square brackets
* utimes.c (decode_utimes): enclose timespec array in square brackets
instead of curly brackets.
2015-07-16 01:36:55 +00:00
a0bd3749fc Declare syscall parsers using SYS_FUNC macro
Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
2015-04-07 11:22:49 +00:00
481e067836 file.c: move utimes, futimesat, utimensat, and osf_utimes parsers to a separate file
* utimes.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (decode_utimes, sys_utimes, sys_futimesat, sys_utimensat,
sys_osf_utimes): Move to utimes.c.
2014-12-11 21:39:21 +00:00