|Try to guess the arguments of each function appearing in the backtrace. Not more than count arguments are printed for each function. Ability to correctly read the argument values depends on the architecture and compiler optimization, but it is generally impossible to do.|
|For each thread, print not more than count frames in the backtrace.|
|-l||Instead of walking the stacks of the running threads, print the names of the shared objects loaded into the process address space. The output of the utility resembles the output of ldd(1) command run on the binary.|
|-o||Show the names of the objects which contain the location of the frame current instruction pointer.|
|-O||Same as -o , but displays the full path to the objects instead of only names.|
|-t||Measure and print the time which the target process was suspended to walk the stack frames.|
The pstack command is reimplemented by
.An Konstantin Belousov to mimic the user interface of other similar pstack utilities, in particular, the pstack written by
.An Peter Edwards . This version relies on the libunwind library as the stack unwinding backend.
On 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 libunwind needs to read the symbols from the on-disk ELF image. This could typically occur if the binary or library is reinstalled, but the process uses older version of the binary with the same name.
The pstack only works on the processes executing ELF binaries.
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 pstack detach.
The pstack utility cannot yet extract a backtrace from the core dump.
The architecture of the program and pstack shall match (this is libunwind restriction).