This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: about cygwin_stackdump()


On Wed, Jan 08, 2014 at 06:06:59PM +0900, KIMURA Masaru wrote:
>2014/1/8 Christopher Faylor wrote:
>> 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);
>
>thanks, ill look into this later.
>
>> 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
>
>i may have one of BLODA, but could you mind to recheck followings for me?
>
>* i wrote "signle process" that means w/o fork() + waitpid().

You made it harder than necessary to debug your problem.

If you had created a very small test case which demonstrated the issue
with clear instructions for building it, then this back and forth
wouldn't be necessary.

Actually, even that would likely not have been necessary if you had just
provided the error message that you were getting from fopen().

i.e., http://cygwin.com/problems.html

Exporting this function is an ancient mistake but we are stuck with
keeping it around to maintain backwards compatibility.  There is
no guarantee that the stackdump you get from this is correct and
we have no plans on augmenting it further.

That said, however, I've made changes to cause the file handle of
the stackdump file to be closed.  It will be in today's snapshot when
it shows up.

http://cygwin.com/snapshots/

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]