delorie.com/archives/browse.cgi | search |
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:subject:references:to:reply-to:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=hy3InAUgbuCSm/nL | |
KARB0L4UvvZ5sCgVwjCVSupVP6MVZd+6AcBsaW1vbDbeNwNSnBLcLS5bvk9g4bDO | |
QceE7znCHKvTfmSvCp3nJbmfvUvW//F+H0SZYtoDdpgIBGGzYuSGZrXmUbZG0GpL | |
pza4oCgiBchR/eE2V2SoLIrseMc= | |
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:subject:references:to:reply-to:from:message-id | |
:date:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=F370JnDVOIfRhF+En2WBf3 | |
3+8D0=; b=cY5rFKp1HZzKOWck8GkBmI60Euj1n7mR+mxLQvmJuepkEGmJ6xpPYo | |
ECtBLQ0odFnyDZNWKlt9T5I3cdsWmvfRA2lyzgDvtk29vZrblwVxBMBeZngM3bGD | |
opEcSii+aIwU3hB9Nxk2CNYIX9w3ukiLwmTIiZMz+RPiiy+MKOtcg= | |
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.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=pty, H*MI:sk:fd69580, pops, H*r:ip*64.59.134.12 |
X-HELO: | smtp-out-no.shaw.ca |
X-Authority-Analysis: | v=2.2 cv=Qb8khYTv c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=owX1-wBbAAAA:20 a=o8B5aRGxox3SPnWPblQA:9 a=QEXdDO2ut3YA:10 |
Subject: | Re: Cygwin shell eats Windows exceptions? |
References: | <d0503299c2ae40aaa34023285486deb0 AT ntmaexbe04 DOT bedford DOT progress DOT com> <384029be-4060-cb6b-d1e5-ea88cccb5999 AT Shaw DOT ca> <fd695806340147cbba3d42c761bfc063 AT ntmaexbe04 DOT bedford DOT progress DOT com> |
To: | cygwin AT cygwin DOT com |
Reply-To: | Brian DOT Inglis AT SystematicSw DOT ab DOT ca |
From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca> |
Message-ID: | <2ff7ceba-3e08-d514-372b-41e5696c37a5@SystematicSw.ab.ca> |
Date: | Thu, 13 Oct 2016 16:55:07 -0600 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <fd695806340147cbba3d42c761bfc063@ntmaexbe04.bedford.progress.com> |
X-CMAE-Envelope: | MS4wfKE//8JcaLoedZlLWMMJIo5DxNwfvJgnGt0nzSEIzk8jxHUNJO0c2h9RW7ulQg5FLOcxGU+haT9YOt2TqpL9yspxIf+bTFQ7+YbvzhG/hiY7ZkxUCrh3 ROuFdFRKyongpnYIpDReUr1BDgRyQr2Jk7gB58Exj3vA9o2+CXtTKAr3YJTXw3yHX9YlgQj5mja3YQ== |
X-IsSubscribed: | yes |
On 2016-10-13 11:56, Bill Smith wrote: >> On 2016-10-13 08:35, Bill Smith wrote: >>> I'm trying to run my Windows C++ application which has a call to >>> DebugBreak() to bring up the popup asking if you want to debug this >>> application or terminate it. If I run the program within Cygwin, the >>> program just exits. >>> If I run the application from a Windows command prompt, I get the >>> Windows popup that I'm expecting. It seems that the Cygwin shell is >>> eating exceptions (sigsegv or similar signals?). Is there a way for me >>> to disable this behavior? >> >> Not giving us much info to go on here - is this a Cygwin, curses, Cygwin/X, or >> Windows native app, and what kind of popup is used? >> If a Windows native app, is it a console app, or do you run it with cygstart >> from Cygwin? >> If a Cygwin or X app, have you tried running strace, gdb (or a GUI FE) on it? >> If the latter, please post or attach the results, and attach the output from >> cygcheck -svr in a reply. > [Bill Smith] > Sorry for the lack of info. This is a Windows native console application. Here's the source code: > #include <windows.h> > int main() > { > DebugBreak(); > } > Compiled it with Visual Studio 2010: > cl debug.cpp > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 > Copyright (C) Microsoft Corporation. All rights reserved. > debug.cpp > Microsoft (R) Incremental Linker Version 10.00.30319.01 > Copyright (C) Microsoft Corporation. All rights reserved. > /out:debug.exe > debug.obj > When you run the application from a Windows command prompt, you get a popup similar to: > http://imgur.com/a/VCgeW > It says "debug.exe has stopped working" and it gives you the option of closing the program, checking online for a solution, or to debug the program. > From a Cygwin shell, nothing happens. > Another example is to do an access violation (segv) with a program like this: > int main() { > int* f = 0; > *f = 1234; > } > In Cygwin, It'll say "Segmentation Fault" and fail. In Windows command prompt, I get the same popup with the other program which gives me the option to bring up the debugger. > Our product is built using the Visual Studio compiler and we do the build & test from within a Cygwin shell (c:\cygwin\bin\sh.exe). > I attached the cygcheck -svr output to this email. As it pops up a Windows msgbox, and the process is being run under a pty (pseudo-tty) without any window available, that will just fail. Why not just trap and report any exceptions console style and return an error? If you need to do interactive debugging, run it under cmd or with cygstart. If you need the best of both worlds, you can translate your scripts from bash to cmd and have the option. -- -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |