21.1.3 SVR4 Process Information
Many versions of SVR4 and compatible systems provide a facility called
/proc that can be used to examine the image of a running
process using file-system subroutines. If gdb is configured
for an operating system with this facility, the command
proc is available to report information about the process running
your program, or about any process running on your system.
proc works only on SVR4 systems that include the
This includes, as of this writing, gnu/Linux, OSF/1 (Digital
Unix), Solaris, Irix, and Unixware, but not HP-UX, for example.
- Summarize available information about any running process. If a
process ID is specified by process-id, display information about
that process; otherwise display information about the program being
debugged. The summary includes the debugged process ID, the command
line used to invoke it, its current working directory, and its
executable file's absolute file name.
On some systems, process-id can be of the form [pid]/tid which specifies a certain thread ID within a process. If the optional pid part is missing, it means a thread from the process being debugged (the leading / still needs to be present, or else gdb will interpret the number as a process ID rather than a thread ID).
info proc 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 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.
info proc stat
info proc status
- These subcommands are specific to 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 nice
value; etc. For more information, see the proc man page
(type man 5 proc from your shell prompt).
info proc all
- Show all the information about the process described under all of the
- This command enables and disables tracing of
- Show the current state of
procfsAPI call tracing.
- Tell gdb to write
procfsAPI trace to the named file. gdb appends the trace info to the previous contents of the file. The default is to display the trace on the standard output.
- Show the file to which
procfsAPI trace is written.
- These commands enable and disable tracing of entries into and exits
- For QNX Neutrino only, this command displays the list of all the
processes and all the threads within each process.
- For QNX Neutrino only, this command displays the list of all mapinfos.