If application is built using cygwin then stackdump file is created in case of crash. This file has name your_app.exe.stackdump. Content of this file looks like this:
Exception: STATUS_ACCESS_VIOLATION at eip=004055D9
eax=00000000 ebx=10470C5F ecx=611691E8 edx=FFFFFFFF esi=10470C6D edi=00000000
ebp=0028CBB8 esp=0028CB20 program=C:/*****/***/*****/******.exe, pid 4036, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028CBB8 004055D9 (0042F380, 0028CBF8, 0040F0AC, 0040F0AE)
0028CC88 0040662D (0040C7B0, 0040F220, 0040D36C, 0040D697)
0028CCC8 004097CF (10470C58, 0040D802, 612434B4, 10470C5F)
0028CCE8 0040A02D (00000001, 10438350, 10438270, 00008000)
0028CD58 61007038 (00000000, 0028CD94, 61006980, FFFDE000)
End of stack trace
You can convert this file into human-readable format using addr2line utility.
Example:
awk '/^[0-9]/{print $2}' testprog.exe.stackdump | addr2line -f -e testprog.exe
After execution you should get output like this:
fun2
/cygdrive/e/workdir/app.cpp:100
fun1
/cygdrive/e/workdir/app.cpp:200
main
/cygdrive/e/workdir/app.cpp:221
I created simple bash-script (see attachment). Execution example:
load_stackdump.sh testprog.exe testprog.exe.stackdump
Bash script: load_stackdump.sh