How can one grab a stack trace in C?

c, cross-platform, debugging, stack-trace, windows

Solution

glibc provides `backtrace()` function.

http://www.gnu.org/software/libc/manual/html_node/Backtraces.html

Problem

I know there's no standard C function to do this. I was wondering what are the techniques to to this on Windows and *nix? (Windows XP is my most important OS to do this on right now.)

Original source

Related problems