You are not logged in.
Pages: 1
Is pstack in some official or unofficial Arch package? Pstack can print the call stack of a running app, great for debugging. Search on this site doen't smell the faintest whiff of it here. I can only find 32-bit versions of questionable quality out there in the wild. I'm running x86_64, and must use pstack on a 64 bit program.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
I don't know if someone has ported Solaris' ptrace, but for printing a snapshot of the call stack of a running process, using gdb in batch mode (gdb -batch -ex bt -p insert_pid_here) should do.
Offline
I believe darenw's talking about this program: http://sourceforge.net/projects/bsd-pstack/
Offline
There is no package for it in the repos or aur, something that you would know if you had searched.
Feel free to write a PKGBUILD and submit it tho
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Yes, that BSD thing is the one. If I were more of a BSD user, I would have mentioned it.
I found lsstack, which only runs 32-bit but might be hackable into 64 bit shape. It is not compiling properly today.
But neither one may be necessary - I have found that gdb can attach to a running process and do a backtrace, without killing the process. I just have to figure out more about bt'ing each thread. Gdb does have to pause execution of the program, which I suspect pstack wouldn't need to do.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
FWIW, bsd-pstack apparently isn't portable to Linux. It's expecting quite different structs from those we have.
Offline
FWIW (and probably worth less than ataraxia's FWIW) the lsstack source does compile after some hacking, and sort of gives some slightly useful information. It is not reliable and in need of more hacking. This is what weekends are for.
I suspect the bsd pstack would be better, if its structs and stuff could be modified.
Last edited by darenw (2009-12-05 02:32:59)
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
I'm also on the search for this, Found pstack by redhat, but it doesn't seem to work at all.
lsstack seems to just print one thread
ataraxia: you're searching for
thread apply all bt (full)
--
Citadel.org - Groupware for the rest of us
Offline
You can use glibc's built-in backtrace: http://www.gnu.org/s/libc/manual/html_n … races.html
An example from an error handler I wrote: http://gitorious.org/dimension/dimensio … .c#line139
Offline
Pages: 1