This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: about cygwin_stackdump()
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 8 Jan 2014 01:36:28 -0500
- Subject: Re: about cygwin_stackdump()
- Authentication-results: sourceware.org; auth=none
- References: <CAPYQg30BUPUatfdQRe2oHEZpzHBpAQzAX2JHek-RyRB5VtsG2g at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
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