You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.2 KiB

.\" pstack manual page.
.\" Copyright (c) 1999 Ross Thompson
.\" Copyright (c) 2001, 2002 Red Hat, Inc.
.\" Original author: Ross Thompson <>
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2, or (at your option)
.\" any later version.
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" GNU General Public License for more details.
.\" You should have received a copy of the GNU General Public License
.\" along with this program; see the file COPYING. If not, write to
.\" the Free Software Foundation, 59 Temple Place - Suite 330,
.\" Boston, MA 02111-1307, USA.
.TH PSTACK 1 "Feb 25 2002" "Red Hat Linux" "Linux Programmer's Manual"
pstack \- print a stack trace of running processes
.B pstack
pid [...]
\f3pstack\f1 attaches to the active processes named by the \f3pid\f1s
on the command line, and prints out an execution stack trace,
including a hint at what the function arguments are. If symbols exist
in the binary (usually the case unless you have run strip(1)), then
symbolic addresses are printed as well.
If the process is part of a thread group, then \f3pstack\f1 will print
out a stack trace for each of the threads in the group.
\f3pstack\f1 currently works only on Linux, only on an x86 machine
running 32 bit ELF binaries (64 bit not supported). Also, for
symbolic information, you need to use a GNU compiler to generate your
program, and you can't strip symbols from the binaries. For thread
information to be dumped, you have to use the debug-aware version of
the LinuxThreads library.
(To check, run nm(1) on your pthreads library, and make sure that the
symbol "__pthread_threads_debug" is defined.)
Threads are not supported with the newer NPTL library.
nm(1), ptrace(2)
Ross Thompson <>
Red Hat, Inc. <>