printcs print call stack in c and c++ how to use just put printcs.h and printcs.c into your source code, and the printcs_segmentfault_test.cc and printcs.cc are demos. note be patient, and you will like it.