Blame SOURCES/0011-strace.1.in-print-names-of-entities-in-bold-provide-.patch

4d44fe
From ffc3e46d6ea23ba71eb49c8bc36eb3068968b691 Mon Sep 17 00:00:00 2001
4d44fe
From: Eugene Syromyatnikov <evgsyr@gmail.com>
4d44fe
Date: Tue, 4 Sep 2018 16:45:04 +0200
4d44fe
Subject: [PATCH 11/27] strace.1.in: print names of entities in bold, provide
4d44fe
 man page sections
4d44fe
4d44fe
* strace.1.in (.SH DESCRIPTION, .SH OPTIONS): Add man page section
4d44fe
numbers.  Make mentions of strace and other entities bold.
4d44fe
4d44fe
Additional changes:
4d44fe
	Update auto-generated strace.1
4d44fe
4d44fe
---
4d44fe
 strace.1.in | 89 ++++++++++++++++++++++++++++++++++++++++++-------------------
4d44fe
 1 file changed, 61 insertions(+), 28 deletions(-)
4d44fe
4d44fe
Index: strace-4.24/strace.1.in
4d44fe
===================================================================
4d44fe
--- strace-4.24.orig/strace.1.in	2018-07-07 12:29:02.000000000 +0200
4d44fe
+++ strace-4.24/strace.1.in	2019-03-10 05:12:00.665873244 +0100
4d44fe
@@ -177,7 +177,7 @@
4d44fe
 open("xyzzy", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
4d44fe
 .CE
4d44fe
 Here, the third argument of
4d44fe
-.B open
4d44fe
+.BR open (2)
4d44fe
 is decoded by breaking down the
4d44fe
 flag argument into its three bitwise-OR constituents and printing the
4d44fe
 mode value in octal by tradition.  Where the traditional or native
4d44fe
@@ -198,7 +198,7 @@
4d44fe
 .B st_mode
4d44fe
 member is carefully decoded into a bitwise-OR of symbolic and numeric values.
4d44fe
 Also notice in this example that the first argument to
4d44fe
-.B lstat
4d44fe
+.BR lstat (2)
4d44fe
 is an input to the system call and the second argument is an output.
4d44fe
 Since output arguments are not modified if the system call fails, arguments may
4d44fe
 not always be dereferenced.  For example, retrying the "ls \-l" example
4d44fe
@@ -224,15 +224,16 @@
4d44fe
 (32 by default) bytes of strings are printed;
4d44fe
 longer strings have an ellipsis appended following the closing quote.
4d44fe
 Here is a line from "ls \-l" where the
4d44fe
-.B getpwuid
4d44fe
+.BR getpwuid (3)
4d44fe
 library routine is reading the password file:
4d44fe
 .CW
4d44fe
 read(3, "root::0:0:System Administrator:/"..., 1024) = 422
4d44fe
 .CE
4d44fe
 While structures are annotated using curly braces, simple pointers
4d44fe
 and arrays are printed using square brackets with commas separating
4d44fe
-elements.  Here is an example from the command "id" on a system with
4d44fe
-supplementary group ids:
4d44fe
+elements.  Here is an example from the command
4d44fe
+.BR id (1)
4d44fe
+on a system with supplementary group ids:
4d44fe
 .CW
4d44fe
 getgroups(32, [100, 0]) = 2
4d44fe
 .CE
4d44fe
@@ -489,7 +490,7 @@
4d44fe
 which is useful to seeing what files the process is referencing.
4d44fe
 Furthermore, using the abbreviation will ensure that you don't
4d44fe
 accidentally forget to include a call like
4d44fe
-.B lstat
4d44fe
+.BR lstat (2)
4d44fe
 in the list.  Betchya woulda forgot that one.
4d44fe
 .TP
4d44fe
 .BR "\-e\ trace" = %process
4d44fe
@@ -769,8 +770,7 @@
4d44fe
 \fB\-e\ inject\fR= expression with default value of
4d44fe
 .I errno
4d44fe
 option set to
4d44fe
-.IR ENOSYS .
4d44fe
-
4d44fe
+.BR ENOSYS .
4d44fe
 .TP
4d44fe
 .BR "\-e\ kvm" = vcpu
4d44fe
 Print the exit reason of kvm vcpu.  Requires Linux kernel version 4.16.0
4d44fe
@@ -794,10 +794,11 @@
4d44fe
 .BI "\-b " syscall
4d44fe
 If specified syscall is reached, detach from traced process.
4d44fe
 Currently, only
4d44fe
-.I execve
4d44fe
+.BR execve (2)
4d44fe
 syscall is supported.  This option is useful if you want to trace
4d44fe
-multi-threaded process and therefore require -f, but don't want
4d44fe
-to trace its (potentially very complex) children.
4d44fe
+multi-threaded process and therefore require
4d44fe
+.BR \-f ,
4d44fe
+but don't want to trace its (potentially very complex) children.
4d44fe
 .TP
4d44fe
 .B \-D
4d44fe
 Run tracer process as a detached grandchild, not as parent of the
4d44fe
@@ -816,16 +817,20 @@
4d44fe
 .B \-p
4d44fe
 .I PID
4d44fe
 .B \-f
4d44fe
-will attach all threads of process PID if it is multi-threaded,
4d44fe
-not only thread with thread_id = PID.
4d44fe
+will attach all threads of process
4d44fe
+.I PID
4d44fe
+if it is multi-threaded, not only thread with
4d44fe
+.IR thread_id " = " PID .
4d44fe
 .TP
4d44fe
 .B \-ff
4d44fe
 If the
4d44fe
 .B \-o
4d44fe
 .I filename
4d44fe
 option is in effect, each processes trace is written to
4d44fe
-.I filename.pid
4d44fe
-where pid is the numeric process id of each process.
4d44fe
+.IR filename . pid
4d44fe
+where
4d44fe
+.I pid
4d44fe
+is the numeric process id of each process.
4d44fe
 This is incompatible with
4d44fe
 .BR \-c ,
4d44fe
 since no per-process counts are kept.
4d44fe
@@ -835,11 +840,30 @@
4d44fe
 to obtain a combined strace log view.
4d44fe
 .TP
4d44fe
 .BI "\-I " interruptible
4d44fe
-When strace can be interrupted by signals (such as pressing ^C).
4d44fe
-1: no signals are blocked; 2: fatal signals are blocked while decoding syscall
4d44fe
-(default); 3: fatal signals are always blocked (default if '-o FILE PROG');
4d44fe
-4: fatal signals and SIGTSTP (^Z) are always blocked (useful to make
4d44fe
-strace -o FILE PROG not stop on ^Z).
4d44fe
+When
4d44fe
+.B strace
4d44fe
+can be interrupted by signals (such as pressing
4d44fe
+.BR ^C ).
4d44fe
+.RS
4d44fe
+.TP 4
4d44fe
+.B 1
4d44fe
+no signals are blocked;
4d44fe
+.TQ
4d44fe
+.B 2
4d44fe
+fatal signals are blocked while decoding syscall (default);
4d44fe
+.TQ
4d44fe
+.B 3
4d44fe
+fatal signals are always blocked (default if
4d44fe
+.BR -o " " \fIFILE\fR " " \fIPROG\fR );
4d44fe
+.TQ
4d44fe
+.B 4
4d44fe
+fatal signals and
4d44fe
+.BR SIGTSTP " (" ^Z )
4d44fe
+are always blocked (useful to make
4d44fe
+.BI "strace -o " "FILE PROG"
4d44fe
+not stop on
4d44fe
+.BR ^Z ).
4d44fe
+.RE
4d44fe
 .SS Startup
4d44fe
 .TP 12
4d44fe
 \fB\-E\ \fIvar\fR=\,\fIval\fR
4d44fe
@@ -920,7 +944,8 @@
4d44fe
 .B strace
4d44fe
 can be used as a wrapper process transparent to the invoking parent process.
4d44fe
 Note that parent-child relationship (signal stop notifications,
4d44fe
-getppid() value, etc) between traced process and its parent are not preserved
4d44fe
+.BR getppid (2)
4d44fe
+value, etc) between traced process and its parent are not preserved
4d44fe
 unless
4d44fe
 .B \-D
4d44fe
 is used.
4d44fe
@@ -987,8 +1012,11 @@
4d44fe
 definitions during the build time.
4d44fe
 Please refer to the output of the
4d44fe
 .B strace \-V
4d44fe
-command in order to figure out what support is available in your strace build
4d44fe
-("non-native" refers to an ABI that differs from the ABI strace has):
4d44fe
+command in order to figure out what support is available in your
4d44fe
+.B strace
4d44fe
+build ("non-native" refers to an ABI that differs from the ABI
4d44fe
+.B strace
4d44fe
+has):
4d44fe
 .TP 15
4d44fe
 .B m32-mpers
4d44fe
 .B strace
4d44fe
@@ -1057,17 +1085,22 @@
4d44fe
 .LP
4d44fe
 On x32, syscalls that are intended to be used by 64-bit processes and not x32
4d44fe
 ones (for example,
4d44fe
-.BR readv ,
4d44fe
+.BR readv (2),
4d44fe
 that has syscall number 19 on x86_64, with its x32 counterpart has syscall
4d44fe
 number 515), but called with
4d44fe
 .B __X32_SYSCALL_BIT
4d44fe
-flag being set, are designated with "#64" suffix.
4d44fe
+flag being set, are designated with
4d44fe
+.B "#64"
4d44fe
+suffix.
4d44fe
 .LP
4d44fe
 On some platforms a process that is attached to with the
4d44fe
 .B \-p
4d44fe
-option may observe a spurious EINTR return from the current
4d44fe
-system call that is not restartable.  (Ideally, all system calls
4d44fe
-should be restarted on strace attach, making the attach invisible
4d44fe
+option may observe a spurious
4d44fe
+.B EINTR
4d44fe
+return from the current system call that is not restartable.
4d44fe
+(Ideally, all system calls should be restarted on
4d44fe
+.B strace
4d44fe
+attach, making the attach invisible
4d44fe
 to the traced process, but a few system calls aren't.
4d44fe
 Arguably, every instance of such behavior is a kernel bug.)
4d44fe
 This may have an unpredictable effect on the process
4d44fe
Index: strace-4.24/strace.1
4d44fe
===================================================================
4d44fe
--- strace-4.24.orig/strace.1	2018-08-14 02:44:59.000000000 +0200
4d44fe
+++ strace-4.24/strace.1	2019-03-10 05:15:15.101926224 +0100
4d44fe
@@ -53,7 +53,7 @@
4d44fe
 .  el \
4d44fe
 .    BR "\\$1"
4d44fe
 ..
4d44fe
-.TH STRACE 1 "2018-07-07" "strace 4.24"
4d44fe
+.TH STRACE 1 "2019-03-08" "strace 4.24"
4d44fe
 .SH NAME
4d44fe
 strace \- trace system calls and signals
4d44fe
 .SH SYNOPSIS
4d44fe
@@ -177,7 +177,7 @@
4d44fe
 open("xyzzy", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
4d44fe
 .CE
4d44fe
 Here, the third argument of
4d44fe
-.B open
4d44fe
+.BR open (2)
4d44fe
 is decoded by breaking down the
4d44fe
 flag argument into its three bitwise-OR constituents and printing the
4d44fe
 mode value in octal by tradition.  Where the traditional or native
4d44fe
@@ -198,7 +198,7 @@
4d44fe
 .B st_mode
4d44fe
 member is carefully decoded into a bitwise-OR of symbolic and numeric values.
4d44fe
 Also notice in this example that the first argument to
4d44fe
-.B lstat
4d44fe
+.BR lstat (2)
4d44fe
 is an input to the system call and the second argument is an output.
4d44fe
 Since output arguments are not modified if the system call fails, arguments may
4d44fe
 not always be dereferenced.  For example, retrying the "ls \-l" example
4d44fe
@@ -224,15 +224,16 @@
4d44fe
 (32 by default) bytes of strings are printed;
4d44fe
 longer strings have an ellipsis appended following the closing quote.
4d44fe
 Here is a line from "ls \-l" where the
4d44fe
-.B getpwuid
4d44fe
+.BR getpwuid (3)
4d44fe
 library routine is reading the password file:
4d44fe
 .CW
4d44fe
 read(3, "root::0:0:System Administrator:/"..., 1024) = 422
4d44fe
 .CE
4d44fe
 While structures are annotated using curly braces, simple pointers
4d44fe
 and arrays are printed using square brackets with commas separating
4d44fe
-elements.  Here is an example from the command "id" on a system with
4d44fe
-supplementary group ids:
4d44fe
+elements.  Here is an example from the command
4d44fe
+.BR id (1)
4d44fe
+on a system with supplementary group ids:
4d44fe
 .CW
4d44fe
 getgroups(32, [100, 0]) = 2
4d44fe
 .CE
4d44fe
@@ -489,7 +490,7 @@
4d44fe
 which is useful to seeing what files the process is referencing.
4d44fe
 Furthermore, using the abbreviation will ensure that you don't
4d44fe
 accidentally forget to include a call like
4d44fe
-.B lstat
4d44fe
+.BR lstat (2)
4d44fe
 in the list.  Betchya woulda forgot that one.
4d44fe
 .TP
4d44fe
 .BR "\-e\ trace" = %process
4d44fe
@@ -769,8 +770,7 @@
4d44fe
 \fB\-e\ inject\fR= expression with default value of
4d44fe
 .I errno
4d44fe
 option set to
4d44fe
-.IR ENOSYS .
4d44fe
-
4d44fe
+.BR ENOSYS .
4d44fe
 .TP
4d44fe
 .BR "\-e\ kvm" = vcpu
4d44fe
 Print the exit reason of kvm vcpu.  Requires Linux kernel version 4.16.0
4d44fe
@@ -794,10 +794,11 @@
4d44fe
 .BI "\-b " syscall
4d44fe
 If specified syscall is reached, detach from traced process.
4d44fe
 Currently, only
4d44fe
-.I execve
4d44fe
+.BR execve (2)
4d44fe
 syscall is supported.  This option is useful if you want to trace
4d44fe
-multi-threaded process and therefore require -f, but don't want
4d44fe
-to trace its (potentially very complex) children.
4d44fe
+multi-threaded process and therefore require
4d44fe
+.BR \-f ,
4d44fe
+but don't want to trace its (potentially very complex) children.
4d44fe
 .TP
4d44fe
 .B \-D
4d44fe
 Run tracer process as a detached grandchild, not as parent of the
4d44fe
@@ -816,16 +817,20 @@
4d44fe
 .B \-p
4d44fe
 .I PID
4d44fe
 .B \-f
4d44fe
-will attach all threads of process PID if it is multi-threaded,
4d44fe
-not only thread with thread_id = PID.
4d44fe
+will attach all threads of process
4d44fe
+.I PID
4d44fe
+if it is multi-threaded, not only thread with
4d44fe
+.IR thread_id " = " PID .
4d44fe
 .TP
4d44fe
 .B \-ff
4d44fe
 If the
4d44fe
 .B \-o
4d44fe
 .I filename
4d44fe
 option is in effect, each processes trace is written to
4d44fe
-.I filename.pid
4d44fe
-where pid is the numeric process id of each process.
4d44fe
+.IR filename . pid
4d44fe
+where
4d44fe
+.I pid
4d44fe
+is the numeric process id of each process.
4d44fe
 This is incompatible with
4d44fe
 .BR \-c ,
4d44fe
 since no per-process counts are kept.
4d44fe
@@ -835,11 +840,30 @@
4d44fe
 to obtain a combined strace log view.
4d44fe
 .TP
4d44fe
 .BI "\-I " interruptible
4d44fe
-When strace can be interrupted by signals (such as pressing ^C).
4d44fe
-1: no signals are blocked; 2: fatal signals are blocked while decoding syscall
4d44fe
-(default); 3: fatal signals are always blocked (default if '-o FILE PROG');
4d44fe
-4: fatal signals and SIGTSTP (^Z) are always blocked (useful to make
4d44fe
-strace -o FILE PROG not stop on ^Z).
4d44fe
+When
4d44fe
+.B strace
4d44fe
+can be interrupted by signals (such as pressing
4d44fe
+.BR ^C ).
4d44fe
+.RS
4d44fe
+.TP 4
4d44fe
+.B 1
4d44fe
+no signals are blocked;
4d44fe
+.TQ
4d44fe
+.B 2
4d44fe
+fatal signals are blocked while decoding syscall (default);
4d44fe
+.TQ
4d44fe
+.B 3
4d44fe
+fatal signals are always blocked (default if
4d44fe
+.BR -o " " \fIFILE\fR " " \fIPROG\fR );
4d44fe
+.TQ
4d44fe
+.B 4
4d44fe
+fatal signals and
4d44fe
+.BR SIGTSTP " (" ^Z )
4d44fe
+are always blocked (useful to make
4d44fe
+.BI "strace -o " "FILE PROG"
4d44fe
+not stop on
4d44fe
+.BR ^Z ).
4d44fe
+.RE
4d44fe
 .SS Startup
4d44fe
 .TP 12
4d44fe
 \fB\-E\ \fIvar\fR=\,\fIval\fR
4d44fe
@@ -920,7 +944,8 @@
4d44fe
 .B strace
4d44fe
 can be used as a wrapper process transparent to the invoking parent process.
4d44fe
 Note that parent-child relationship (signal stop notifications,
4d44fe
-getppid() value, etc) between traced process and its parent are not preserved
4d44fe
+.BR getppid (2)
4d44fe
+value, etc) between traced process and its parent are not preserved
4d44fe
 unless
4d44fe
 .B \-D
4d44fe
 is used.
4d44fe
@@ -987,8 +1012,11 @@
4d44fe
 definitions during the build time.
4d44fe
 Please refer to the output of the
4d44fe
 .B strace \-V
4d44fe
-command in order to figure out what support is available in your strace build
4d44fe
-("non-native" refers to an ABI that differs from the ABI strace has):
4d44fe
+command in order to figure out what support is available in your
4d44fe
+.B strace
4d44fe
+build ("non-native" refers to an ABI that differs from the ABI
4d44fe
+.B strace
4d44fe
+has):
4d44fe
 .TP 15
4d44fe
 .B m32-mpers
4d44fe
 .B strace
4d44fe
@@ -1057,17 +1085,22 @@
4d44fe
 .LP
4d44fe
 On x32, syscalls that are intended to be used by 64-bit processes and not x32
4d44fe
 ones (for example,
4d44fe
-.BR readv ,
4d44fe
+.BR readv (2),
4d44fe
 that has syscall number 19 on x86_64, with its x32 counterpart has syscall
4d44fe
 number 515), but called with
4d44fe
 .B __X32_SYSCALL_BIT
4d44fe
-flag being set, are designated with "#64" suffix.
4d44fe
+flag being set, are designated with
4d44fe
+.B "#64"
4d44fe
+suffix.
4d44fe
 .LP
4d44fe
 On some platforms a process that is attached to with the
4d44fe
 .B \-p
4d44fe
-option may observe a spurious EINTR return from the current
4d44fe
-system call that is not restartable.  (Ideally, all system calls
4d44fe
-should be restarted on strace attach, making the attach invisible
4d44fe
+option may observe a spurious
4d44fe
+.B EINTR
4d44fe
+return from the current system call that is not restartable.
4d44fe
+(Ideally, all system calls should be restarted on
4d44fe
+.B strace
4d44fe
+attach, making the attach invisible
4d44fe
 to the traced process, but a few system calls aren't.
4d44fe
 Arguably, every instance of such behavior is a kernel bug.)
4d44fe
 This may have an unpredictable effect on the process