I'd like to collect just the stacktrace for crashes which would normally result in very large coredumps. It seems like one option is to attach to the process when it's in a crashed but not yet cleaned up state. I tried gstack which uses gdb but gdb didn't like the fact that the process had already crashed.
Does anyone know if libunwind could do this?
This question seemed relevant:
How to get a "backtrace" (like gdb) using only ptrace (linux, x86/x86_64)
and contained a reference to this example:
http://git.savannah.gnu.org/cgit/libunwind.git/plain/tests/test-ptrace.c?h=v1.0-stable
Thanks a bunch!