delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/08/11:57:53

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=uvw8ZYbEJ24I2hMbDUuH45jG21SlW+pFu6QKfn1gvmgsExlLFGyG5
+4NKaMz8+rtD9X7M9QKlw4cpbz2pxZhq3pb0zEMkDEBZPEj/8n8fpxu4DhCJrgiG
5U5r6fVGu2rjm6iYAF9onYdJoasXiI0Ndsg7A11eSw+BuORztGD76o=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=P4xDu3Q1azM4SxUiksypZnSM0wY=; b=T5yF9odf48q5JvqaUfjAl7fNBou7
ZHyEYEDwACkS3IqvZrSesI4HoW8SGiP3NjT2nRa91YI5+5qk24cf03udEdaQuA7h
lqXhIppSIU779O0eOr+ZYXnvEpQaTO/N3gMyeoYPMelEc6o3N5Es6Ezi58SRoSUL
kpJDco7G5vAk30Q=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mho-01-ewr.mailhop.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1+i+sLNY6E5EE1fgMkNdSds
Date: Wed, 8 Jan 2014 11:57:31 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: about cygwin_stackdump()
Message-ID: <20140108165730.GD4931@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAPYQg30BUPUatfdQRe2oHEZpzHBpAQzAX2JHek-RyRB5VtsG2g AT mail DOT gmail DOT com> <20140108063628 DOT GA1732 AT ednor DOT casa DOT cgf DOT cx> <CAPYQg31JNVz3m8fHvvnrWd+LtO2WCbdKD1wzGt1p6O76dSBgKg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAPYQg31JNVz3m8fHvvnrWd+LtO2WCbdKD1wzGt1p6O76dSBgKg@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019