[v2,5/5] Document support for 'info proc' on FreeBSD.

Message ID 20180104014923.11899-6-jhb@FreeBSD.org
State New, archived
Headers

Commit Message

John Baldwin Jan. 4, 2018, 1:49 a.m. UTC
  Since the 'info proc' support on FreeBSD does not use /proc, reword
the documentation for 'info proc' to not assume /proc.  This includes
renaming the node to 'Process Information' and suggesting that
additional process information can be queried via different
OS-specific interfaces.  This is also cleans up the description of
'info proc' support for core files a bit as /proc is not used for core
file support on any current platform.

gdb/doc/ChangeLog:

	* gdb.texinfo (pwd): Update cross-reference for Process Information
	node and remove explicit /proc reference.
	(Native): Rename subsection from SVR4 Process Information to
	Process Information.
	(Process Information): Reword introduction to be less /proc
	centric.  Document support for "info proc" on FreeBSD.
---
 gdb/doc/ChangeLog   |  9 +++++++
 gdb/doc/gdb.texinfo | 76 +++++++++++++++++++++++++++++++----------------------
 2 files changed, 53 insertions(+), 32 deletions(-)
  

Comments

Eli Zaretskii Jan. 4, 2018, 4:38 p.m. UTC | #1
> From: John Baldwin <jhb@FreeBSD.org>
> Date: Wed,  3 Jan 2018 17:49:23 -0800
> 
> Since the 'info proc' support on FreeBSD does not use /proc, reword
> the documentation for 'info proc' to not assume /proc.  This includes
> renaming the node to 'Process Information' and suggesting that
> additional process information can be queried via different
> OS-specific interfaces.  This is also cleans up the description of
> 'info proc' support for core files a bit as /proc is not used for core
> file support on any current platform.
> 
> gdb/doc/ChangeLog:
> 
> 	* gdb.texinfo (pwd): Update cross-reference for Process Information
> 	node and remove explicit /proc reference.
> 	(Native): Rename subsection from SVR4 Process Information to
> 	Process Information.
> 	(Process Information): Reword introduction to be less /proc
> 	centric.  Document support for "info proc" on FreeBSD.

OK, thanks.

Do we need a NEWS entry for this?
  

Patch

diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 5a3437cd32..b4e214cc06 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,12 @@ 
+2018-01-03  John Baldwin  <jhb@FreeBSD.org>
+
+	* gdb.texinfo (pwd): Update cross-reference for Process Information
+	node and remove explicit /proc reference.
+	(Native): Rename subsection from SVR4 Process Information to
+	Process Information.
+	(Process Information): Reword introduction to be less /proc
+	centric.  Document support for "info proc" on FreeBSD.
+
 2018-01-03  Xavier Roirand  <roirand@adacore.com>
 
 	* gdb.texinfo (Set Catchpoints): Add documentation for new
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 8bdafb0ba4..096c82cc82 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2523,9 +2523,9 @@  Print the @value{GDBN} working directory.
 
 It is generally impossible to find the current working directory of
 the process being debugged (since a program can change its directory
-during its run).  If you work on a system where @value{GDBN} is
-configured with the @file{/proc} support, you can use the @code{info
-proc} command (@pxref{SVR4 Process Information}) to find out the
+during its run).  If you work on a system where @value{GDBN} supports
+the @code {info proc} command (@pxref{Process Information}), you can
+use the @code{info proc} command to find out the
 current working directory of the debuggee.
 
 @node Input/Output
@@ -21712,7 +21712,7 @@  configurations.
 
 @menu
 * BSD libkvm Interface::	Debugging BSD kernel memory images
-* SVR4 Process Information::    SVR4 process information
+* Process Information::         Process information
 * DJGPP Native::                Features specific to the DJGPP port
 * Cygwin Native::		Features specific to the Cygwin port
 * Hurd Native::                 Features specific to @sc{gnu} Hurd
@@ -21759,24 +21759,32 @@  Set current context from proc address.  This command isn't available on
 modern FreeBSD systems.
 @end table
 
-@node SVR4 Process Information
-@subsection SVR4 Process Information
+@node Process Information
+@subsection Process Information
 @cindex /proc
 @cindex examine process image
 @cindex process info via @file{/proc}
 
-Many versions of SVR4 and compatible systems provide a facility called
-@samp{/proc} that can be used to examine the image of a running
-process using file-system subroutines.
+Some operating systems provide interfaces to fetch additional
+information about running processes beyond memory and per-thread
+register state.  If @value{GDBN} is configured for an operating system
+with a supported interface, the command @code{info proc} is available
+to report information about the process running your program, or about
+any process running on your system.
 
-If @value{GDBN} is configured for an operating system with this
-facility, the command @code{info proc} is available to report
-information about the process running your program, or about any
-process running on your system.  This includes, as of this writing,
-@sc{gnu}/Linux and Solaris, for example.
+One supported interface is a facility called @samp{/proc} that can be
+used to examine the image of a running process using file-system
+subroutines.  This facility is supported on @sc{gnu}/Linux and Solaris
+systems.
 
-This command may also work on core files that were created on a system
-that has the @samp{/proc} facility.
+On FreeBSD systems, system control nodes are used to query process
+information.
+
+In addition, some systems may provide additional process information
+in core files.  Note that a core file may include a subset of the
+information available from a live process.  Process information is
+currently avaiable from cores created on @sc{gnu}/Linux and FreeBSD
+systems.
 
 @table @code
 @kindex info proc
@@ -21800,36 +21808,40 @@  a process ID rather than a thread ID).
 @item info proc cmdline
 @cindex info proc cmdline
 Show the original command line of the process.  This command is
-specific to @sc{gnu}/Linux.
+supported on @sc{gnu}/Linux and FreeBSD.
 
 @item info proc cwd
 @cindex info proc cwd
 Show the current working directory of the process.  This command is
-specific to @sc{gnu}/Linux.
+supported on @sc{gnu}/Linux and FreeBSD.
 
 @item info proc exe
 @cindex info proc exe
-Show the name of executable of the process.  This command is specific
-to @sc{gnu}/Linux.
+Show the name of executable of the process.  This command is supported
+on @sc{gnu}/Linux and FreeBSD.
 
 @item info proc mappings
 @cindex memory address space mappings
-Report the memory address space ranges accessible in the program, with
-information on whether the process has read, write, or execute access
-rights to each range.  On @sc{gnu}/Linux systems, each memory range
-includes the object file which is mapped to that range, instead of the
-memory access rights to that range.
+Report the memory address space ranges accessible in the program.  On
+Solaris and FreeBSD systems, each memory range includes information on
+whether the process has read, write, or execute access rights to each
+range.  On @sc{gnu}/Linux and FreeBSD systems, each memory range
+includes the object file which is mapped to that range.
 
 @item info proc stat
 @itemx info proc status
 @cindex process detailed status information
-These subcommands are specific to @sc{gnu}/Linux systems.  They show
-the process-related information, including the user ID and group ID;
-how many threads are there in the process; its virtual memory usage;
-the signals that are pending, blocked, and ignored; its TTY; its
-consumption of system and user time; its stack size; its @samp{nice}
-value; etc.  For more information, see the @samp{proc} man page
-(type @kbd{man 5 proc} from your shell prompt).
+Show additional process-related information, including the user ID and
+group ID; virtual memory usage; the signals that are pending, blocked,
+and ignored; its TTY; its consumption of system and user time; its
+stack size; its @samp{nice} value; etc.  These commands are supported
+on @sc{gnu}/Linux and FreeBSD.
+
+For @sc{gnu}/Linux systems, see the @samp{proc} man page for more
+information (type @kbd{man 5 proc} from your shell prompt).
+
+For FreeBSD systems, @code{info proc stat} is an alias for @code{info
+proc status}.
 
 @item info proc all
 Show all the information about the process described under all of the