Eugene Syromyatnikov 156777f967 Fix old_getrlimit handling
On some historic 32-bit platforms (and 64-bit SuperH), __NR_getrlimit
corresponds to a non-SuS-compatible version that uses a hardcoded value
of 0x7fffffff as infinity. Moreover, in order to provide a backwards
compatibility with that behaviour, some architectures (mips, sparc, and
alpha, with latter being especially peculiar in its ways) just defined
RLIM_INFINITY to that value (with alpha defining RLIM_INFINITY to 2^63-1)
instead of employing sys_old_getrlimit syscall and providing
__NR_ugetrlimit with proper implementation, as other arches did.

Overall, that led to conclusion that printing "RLIM_INFINITY" is never
enough and the actial value should be printed as well.

* linux/i386/syscallent.h ([76]): Changing decoder to old_getrlimit.
* linux/m68k/syscallent.h ([76]): Likewise.
* linux/microblaze/syscallent.h ([76]): Likewise.
* linux/powerpc/syscallent.h ([76]): Likewise.
* linux/s390/syscallent.h ([76]): Likewise.
* linux/sh/syscallent.h ([76]): Likewise.
* linux/sh64/syscallent.h ([76]): Likewise.
* resource.c (sprint_rlim64, sprint_rlim32, print_rlimit64,
print_rlimit32): Remove.
(STRACE_RLIM_INFINITY, STRACE_M32_RLIM_INFINITY,
STRACE_RLIM64_INFINITY, OLD_GETLIMIT_INFINITY): New macro constants.
(enum rlimit_decode_mode): New enumeration.
(struct rlimit_64): Move type definition out of print_rlimit64.
(print_rlim_t): New function, printer of an rlimit value, in accordance
with rlimit decode mode and xlat verbosity mode.
(print_rlimit): Printer of a fetched rlimit_64 structure.
(decode_rlimit): Fetches struct rlimit/rlimit64 in accordance with
current mode and personality, uses print_rlimit for printing.
(do_getrlimit): New function, decodes old_getrlimit/getrlimit syscalls.
(SYS_FUNC(getrlimit)): Call do_getrlimit with RDM_NORMAL mode.
(SYS_FUNC(old_getrlimit)): New function, calls do_getrlimit with
RDM_OLD_GETRLIMIT mode.
(SYS_FUNC(setrlimit)): Call decode_rlimit with RDM_NORMAL mode.
(SYS_FUNC(prlimit64)): Call decode_rlimit with RDM_PRLIMIT64 mode
instead of print_rlimit64.
* tests/xgetrlimit.c (sprint_rlim): Rename to...
(print_rlim): ...this, print to terminal instead of string buffer in
accordance with the output format expected.
(main): Accomodate sprint_rlim -> print_rlim change, use sprintrc.
* tests/getrlimit.c (INFINITY, INFINITY_STR): New macros.
* tests/setrlimit.c: Likewise.
* tests/ugetrlimit.c: Likewise.
2018-09-17 20:12:02 +02:00
2018-08-14 10:11:12 +00:00
2018-09-17 20:12:02 +02:00
2018-08-12 09:50:33 +00:00
2017-06-17 22:54:08 +00:00
2018-09-17 20:12:02 +02:00
2018-06-29 17:56:41 +00:00
2018-01-07 03:11:21 +00:00
2015-07-20 22:03:07 +00:00
2018-08-31 23:05:03 +02:00
2018-02-13 22:00:00 +00:00
2018-03-28 04:29:22 +00:00
2017-05-22 17:33:51 +00:00
2018-08-31 23:05:03 +02:00
2017-07-08 01:49:00 +00:00
2017-07-08 01:49:00 +00:00
2018-06-14 11:00:00 +00:00
2018-08-31 23:05:03 +02:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2009-07-08 21:01:21 +00:00
2015-07-20 22:03:07 +00:00
2018-02-15 11:07:03 +00:00
2017-07-24 12:10:54 +00:00
2017-07-24 12:10:54 +00:00
2018-08-31 23:05:03 +02:00
2015-08-28 08:46:23 +00:00
2018-06-14 11:00:00 +00:00
2018-08-31 23:05:03 +02:00
2018-06-14 11:00:00 +00:00
2018-05-03 00:09:53 +00:00
2017-05-22 17:33:51 +00:00
2018-06-14 11:00:00 +00:00
2018-06-14 11:00:00 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2017-09-05 10:09:10 +02:00
2017-05-22 17:33:51 +00:00
2018-06-14 11:00:00 +00:00
2018-04-19 18:03:58 +00:00
2018-02-13 22:00:00 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2017-09-05 10:09:10 +02:00
2017-05-22 17:33:51 +00:00
2017-09-05 10:09:10 +02:00
2017-03-05 16:29:41 +00:00
2018-06-14 11:00:00 +00:00
2017-06-17 22:54:08 +00:00
2015-11-22 23:10:12 +00:00
2018-08-31 19:33:29 +02:00
2018-06-14 11:00:00 +00:00
2018-06-14 11:00:00 +00:00
2017-05-22 17:33:51 +00:00
2018-06-14 11:00:00 +00:00
2018-06-14 11:00:00 +00:00
2017-05-22 17:33:51 +00:00
2018-06-14 11:00:00 +00:00
2017-09-17 12:04:11 +00:00
2018-06-14 11:00:00 +00:00
2018-06-14 11:00:00 +00:00
2018-09-04 15:41:47 +02:00
2018-03-29 16:00:18 +00:00
2017-05-22 17:33:51 +00:00
2018-04-05 01:40:00 +00:00
2018-04-05 01:40:00 +00:00
2018-09-02 18:16:22 +02:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2018-09-04 15:41:47 +02:00
2018-09-04 15:41:47 +02:00
2018-06-14 11:00:00 +00:00
2018-02-13 22:00:00 +00:00
2018-02-13 22:00:00 +00:00
2018-06-14 11:00:00 +00:00
2018-04-05 01:40:00 +00:00
2015-09-16 00:14:55 +00:00
2018-02-13 22:00:00 +00:00
2018-02-13 22:00:00 +00:00
2018-08-14 10:11:12 +00:00
2018-08-31 23:05:03 +02:00
2018-08-31 23:05:03 +02:00
2018-08-27 23:41:41 +00:00
2016-12-27 23:32:44 +00:00
2018-06-14 11:00:00 +00:00
2017-05-22 17:33:51 +00:00
2017-06-17 22:54:08 +00:00
2018-02-13 22:00:00 +00:00
2018-02-13 22:00:00 +00:00
2016-12-26 10:43:35 +00:00
2018-08-31 23:05:03 +02:00
2017-07-09 18:43:34 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2018-08-31 23:05:03 +02:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2018-02-13 22:00:00 +00:00
2017-05-22 17:33:51 +00:00
2018-06-14 11:00:00 +00:00
2017-05-22 17:33:51 +00:00
2016-08-08 09:54:01 +00:00
2017-05-22 17:33:51 +00:00
2018-08-31 23:05:03 +02:00
2018-04-05 01:40:00 +00:00
2018-04-05 01:40:00 +00:00
2018-07-15 18:51:09 +00:00
2017-05-22 17:33:51 +00:00
2018-03-16 00:55:58 +00:00
2018-02-21 23:03:27 +00:00
2018-09-17 20:12:02 +02:00
2018-02-13 22:00:00 +00:00
2018-04-05 01:40:00 +00:00
2018-02-13 22:00:00 +00:00
2018-02-13 22:00:00 +00:00
2018-02-13 22:00:00 +00:00
2018-08-31 23:05:03 +02:00
2018-02-13 22:00:00 +00:00
2018-02-13 22:00:00 +00:00
2018-08-31 23:05:03 +02:00
2018-04-05 01:40:00 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2016-08-08 09:54:01 +00:00
2017-05-22 17:33:51 +00:00
2018-02-11 00:26:09 +00:00
2018-08-31 23:05:03 +02:00
2018-08-31 23:05:03 +02:00
2018-06-14 11:00:00 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2017-06-17 22:54:08 +00:00
2018-04-05 01:40:00 +00:00
2018-09-11 16:52:52 +02:00
2017-12-03 19:53:48 +01:00
2018-02-13 22:00:00 +00:00
2018-02-13 22:00:00 +00:00
2016-12-01 00:05:09 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2017-06-17 22:54:08 +00:00
2017-05-22 17:33:51 +00:00
2017-05-22 17:33:51 +00:00
2017-07-24 12:10:54 +00:00
2018-04-05 01:40:00 +00:00
2018-08-31 23:05:03 +02:00
2018-04-05 01:40:00 +00:00
2018-04-05 01:40:00 +00:00
2015-12-07 00:38:38 +00:00
2018-09-04 15:41:47 +02:00
2018-04-05 01:40:00 +00:00
2017-01-20 18:30:11 +00:00
2018-09-02 22:20:03 +02:00
2017-05-22 17:33:51 +00:00
2018-08-31 23:05:03 +02:00
2018-02-13 22:00:00 +00:00
2018-08-31 23:05:03 +02:00

strace - the linux syscall tracer

This is strace -- a diagnostic, debugging and instructional userspace utility with a traditional command-line interface for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace.

strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file COPYING for details.

See the file NEWS for information on what has changed in recent versions.

Please read the file INSTALL-git for installation instructions.

Please take a look at the guide for new contributors if you want to get involved in strace development.

The user discussion and development of strace take place on the strace mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to strace-devel@lists.strace.io. The mailing list archives are available at https://lists.strace.io/pipermail/strace-devel/ and other archival sites.

The GIT repository of strace is available at GitHub and GitLab.

The latest binary strace packages are available in many repositories, including OBS, Fedora rawhide, and Sisyphus.

Build Status Code Coverage

Description
No description provided
Readme 17 MiB
Languages
C 92.2%
Shell 3.4%
M4 1.4%
Makefile 0.8%
Roff 0.7%
Other 1.5%