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

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