From patchwork Thu Jan 4 01:49:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 25202 Received: (qmail 31747 invoked by alias); 4 Jan 2018 01:59:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 31734 invoked by uid 89); 4 Jan 2018 01:59:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=avaiable, rights, images X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Jan 2018 01:59:56 +0000 Received: from ralph.baldwin.cx.com (astound-66-234-202-155.ca.astound.net [66.234.202.155]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1EF4B10AFAD for ; Wed, 3 Jan 2018 20:50:19 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH v2 5/5] Document support for 'info proc' on FreeBSD. Date: Wed, 3 Jan 2018 17:49:23 -0800 Message-Id: <20180104014923.11899-6-jhb@FreeBSD.org> In-Reply-To: <20180104014923.11899-1-jhb@FreeBSD.org> References: <20180104014923.11899-1-jhb@FreeBSD.org> X-IsSubscribed: yes 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(-) 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 + + * 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 * 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