|
NAMEpstack —
print the backtrace of the running program
SYNOPSIS
DESCRIPTIONThepstack utility prints the stack backtraces for the
running program. The pstack attaches to the traced
process using the ptrace (2)
debugging interface. If possible, the symbolic name and offset for the
function executing in each frame is displayed. The
pstack can be directed to print the shared object
name, which contains the function.
The first line of the output displays the pid of the traced process, binary name as reported by the kernel, and the currently active osrel version of the ABI for the process. After that, for each thread in the process, the thread id is displayed, followed by the backtrace. The following options are available:
SEE ALSOgdb(1), ldd(1), ptrace(2), libunwind(3), procfs(5)AUTHORSThepstack command is reimplemented by
Konstantin Belousov to mimic the user interface of
other similar pstack utilities, in particular, the
pstack written by
Peter Edwards. This version relies on the libunwind library as the stack unwinding backend.
CAVEATSOn i386, the argument printing code assumes that the frame layout is standard, which is currently often not the case due to the padding added between return address and previous frame pointer, as done by compilers to align the stack.On amd64, the argument printing currently does not work. The amd64 ABI specifies that integer arguments are passed in the registers which are not required to be preserved across function calls. As the result, there is typically no way to re-create the arguments values on any frame except the current one. The symbol names cannot be inferred if the corresponding binary or
shared object are already deleted, since The You cannot get a backtrace for the process, to which another
debugger is currently attached. The
ptrace(2)
debugging mechanism used to obtain the neccessary live process information
causes some syscalls to return EINTR errors on
The The architecture of the program and
Visit the GSP FreeBSD Man Page Interface. |