On Tue, Jan 07, 2014 at 11:35:57AM +0900, KIMURA Masaru wrote: >fopen() stackdump file immediately after cygwin_stackdump() calling in >signle process fails. >is this intentional? >https://github.com/hiyuh/cygwin-stackdump-example
I rewrote your example slightly to make it work with any executable name by calculating the stackdump name like this: char *fname = (char *)malloc(strlen(*__argv) + sizeof (".exe.stackdump")); sprintf(fname, "%s.exe.stackdump", *__argv); printf("fname = %s\n", fname); And compiled it as: gcc -g -DUSE_CYGWIN_STACKDUMP -DUSE_FORK_WAITPID cygwin_stackdump.c -o cygwin_stackdump.exe That worked fine for me on the most recent Cygwin snapshot: 32/64 bit. Possibly you have BLODA: http://cygwin.com/acronyms#BLODA cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple