In some situations where applications run for a long period of time on remote systems, if the application crashes, there is little information about the crash: no core dump or valuable log available. In such cases it is useful to get and log the stack trace at the moment of the crash, thus having some more information in order to solve the problem.
Getting some information about the stack trace is possible using C, as we will see below.