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


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 looks compiling w/ -DUSE_FORK_WAITPID that will use fork() + waitpid().
  we are discussing fork() + waitpid() is really required or not.
  https://github.com/nickg/nvc/pull/25

* correct following my understanding:
  cygwin_stackdump() is in src/winsup/cygwin/exceptions.cc of cygwin.
  according to this code,
  + cygwin_exception::dumpstack() opens stack dump file by using
     open_stackdumpfile().
     there is no configuration for stack dump file name.
  + maximum stack trace depth is 16.
     there is no configuration for this depth.
  + after calling cygwin_exception::dumpstack(), cygwin_stackdump() ends.
     after printing stack trace contents, cygwin_exception::dumpstack() ends.
     thus, cygwin_stackdump() looks having no stack dump file closing.
  + cygwin_stackdump() is exported, but the implementation status looks WIP.

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