delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <45F23B31.D82A198A@dessent.net> |
Date: | Fri, 09 Mar 2007 20:59:29 -0800 |
From: | Brian Dessent <brian AT dessent DOT net> |
X-Mailer: | Mozilla 4.79 [en] (Windows NT 5.0; U) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Cannot get Cygwin to produce a core dump |
References: | <000101c762ce$a31250a0$c5480f82 AT JOHANSEN> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
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 |
Craig Johansen wrote: > Method 1 > > Running ./a.exe results in the following error: > > 6 [main] a 5132 _cygtls::handle_exceptions: Error while dumping state > (probably corrupted stack) > Segmentation fault (core dumped) > > But there is not core file in my directory That is not expected to create a core file. The default action if error_start is not set is to create a .stacktrace file. The error says "core dumped", since that is what upstream bash is designed to print, since that's what happens on most *nixes. Perhaps the bash maintainer could patch this for Cygwin. > Method 2 > > I have added the following to my cygwin.bat file: > > Set CYGWIN=error_start=c:\cygwin\bin\dumper.exe > > Running ./a.exe results in a window to pop-up and reads: > > Setting bfd architecture: No error The new window means dumper was successfully launched. The bfd error means it had some difficulty when trying to create the core file. You should try running dumper directly from a prompt to create a core of a running process and see if you can find out why it's failing. > Method 3 > > I modified the environment variable to be: > > Set CYGWIN=error_start=c:\cygwin\home\MDGCUSTOMER\wrapper_dumper.cmd I wouldn't expect that to work, since a .cmd file is not directly executable; it has to be run with the COMSPEC as "cmd.exe file.cmd". Explorer hides this fact for you because it uses ShellExecute() and not CreateProcess(), and the former knows how to look up an extension in the registry and find out how to run it, whereas CreateProcess requires the exact command and arguments. In order for this to work you'd need to create a wrapper .exe that spawns cmd.exe with the script filename as argument. > [6] main a 3248 try_to_debug: Fialed to start debugger, Win32 error 2 This is the CreateProcess error. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |