[PATCH] Raise strace awareness
Dmitry V. Levin
ldv at altlinux.org
Wed Apr 1 14:51:12 UTC 2020
On Wed, Apr 01, 2020 at 04:03:42PM +0200, Eugene Syromyatnikov wrote:
> After der Strauss awareness has been raised sufficiently[1][2], it is
> time for den Strauss itself to raise the awareness about strace,
> and to do so, the most modern and contemporary method has been elected:
> displaying tips, tricks and tweaks on each run.
>
> [1] https://lists.strace.io/pipermail/strace-devel/2019-April/008701.html
> [2] https://gitlab.com/strace/strace/commit/e8194a46d619
>
> * strace.c (init) <enum>: Add GETOPT_TIPS.
> <longopts>: Add "no-tips" option.
> (init) <case GETOPT_TIPS>: Set show_tips to false.
> (terminate): Call print_totd.
> (usage): Document --no-tips.
> * strace.1.in (.SS Miscellaneous): Likewise.
> * straus.c (STRAUS_BODY_LINES, MAX_TIP_LINES): New enums.
> (tips_tricks_tweaks, tip_top, tip_bottom, tip_left, tip_right): New
> static constants.
> (show_tips): New variable.
> (print_totd): New function.
> * straus.h (show_tips, print_totd): New declarations.
> * tests/bexecve.test: Supply --no-tips to strace invocations.
> * tests/clone_ptrace.test: Likewise.
> * tests/fflush.test: Likewise.
> * tests/first_exec_failure.test: Likewise.
> * tests/options-syntax.test: Likewise.
>
> Suggested-by: Elvira Khabirova <lineprinter0 at gmail.com>
Cool! One nit:
> + { "getpid syscall is present on all",
> + "architectures except on Alpha, where getxpid",
> + "syscall (that returns a pair of PID and PPID",
> + "in a pair of registers) is used instead.",
> + "Other two examples of syscalls that utilise",
> + "two registers for their return walues are",
I suppose you mean "return values".
--
ldv
More information about the Strace-devel
mailing list