delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/10/13/14:19:34

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:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=JpNiGKV0aKjnTwTA
mUvccJZLZztR/laHNgCLUqyu5f+54aMP+25xBHUXk2XKzMBl4uzN++smb8RUZNeZ
tRis/bFEwEH9CKl0oMwOsbE5hyzqcEi6Z4mPHCR/AIs4hDXQARzWj4UhN4s4v0RN
7f0ZNxmq4jVF0fbf0REgJuvLaQg=
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:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=lTdYcvzHop2zFFMngaRloG
Zyq4I=; b=ZORMdR9IsmOLzKwnx3RG8mtDxBRGscCNUCdx2BKd4XqyaeUrH5YwjP
AiOt/jJR4V5rxea2bFvDCFY626kG6MUbKbLqb64ODDXlJR4Et14Diaf45q1n9BXo
xTOlcPaxz8atabXZJiRRYJTZtekfrAdUYUWdltMvntjlOL0prNNts=
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.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Simple, H*f:sk:fd69580, H*MI:sk:fd69580, H*r:ip*192.168.0.6
X-HELO: mail-io0-f171.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=KSE6Jf4AktC6hNLeTFwRGhdC97zYfx/fnuPzANvnzPE=; b=VAmG7a91k4mlJBwwitbuau8WEgwNmIJWPSpDnpDFebVx/0HHwf3P8sB0RDLhcJhCFP ZIpvvdpumml1blkp6USIo/pCnqnTbJzN5ly/i42AdrLkSOK7TwFQT8yeQxti2B/e9lOr JpGukhSXyiX+9Dnmet7xplnuGXmGt9So2/oyFI7SJX1naZWfhDz1vgHlVVZZlu0u+Crd d7GjkaUxZyuolMsqBQe+pR6XDuuAcvLJgf0HU4dBEKVJ8RQM43ZyOdMKixiJR6CDVLle GInZrwYPPOJ4z2F5VOXBvrj0czFKEJOz0k2bVWJvr/46ddwbLc64Y8klrQmd8rzLiJQp Hl2Q==
X-Gm-Message-State: AA6/9RnBhlSFfjZ5ZhGnT75ipauJGfLPRGkJD0w68I1//Ag9speAHb73Wml/4k2TAwoCZw==
X-Received: by 10.107.32.14 with SMTP id g14mr7759569iog.85.1476382745769; Thu, 13 Oct 2016 11:19:05 -0700 (PDT)
Subject: Re: Cygwin shell eats Windows exceptions?
To: cygwin AT cygwin DOT com
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>
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <895baaa1-50d4-129f-1737-5621f7ed72b9@gmail.com>
Date: Thu, 13 Oct 2016 14:18:54 -0400
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-IsSubscribed: yes

On 10/13/2016 1:56 PM, Bill Smith wrote:
> Sorry for the lack of info.  This is a Windows native console application.  Here's the source code:
> 
> #include <windows.h>
> 

A "console application" doesn't require windows.h but this isn't the issue.

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

The Windows cmd console and the Cygwin console behave differently to the
exception.  Not a bug, just not what you wanted.

What if you 'cmd.exe /c foo.exe' from the Cygwin shell?  Will the
Dialogue popup box occur?  If so you can provide a sh script foo to
execute the foo.exe file.

-- 
cyg Simple

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