From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6993 invoked by alias); 3 Mar 2014 15:02:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 6923 invoked by uid 89); 3 Mar 2014 15:02:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Mar 2014 15:02:13 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id D4836520508; Mon, 3 Mar 2014 16:02:10 +0100 (CET) Date: Mon, 03 Mar 2014 15:02:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Building libsigsegv on Cygwin64 Message-ID: <20140303150210.GC2469@calimero.vinschen.de> Mail-Followup-To: cygwin@cygwin.com References: <530771A3.7000603@alice.it> <53136870.200@cornell.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ftEhullJWpWg/VHq" Content-Disposition: inline In-Reply-To: <53136870.200@cornell.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-03/txt/msg00042.txt.bz2 --ftEhullJWpWg/VHq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3327 On Mar 2 12:20, Ken Brown wrote: > On 2/21/2014 10:32 AM, Angelo Graziosi wrote: > >Trying to build libsigsegv-2.10 on Cygwin64 (using the src tarball and > >its .cygport file from x86 distribution), fails as follows > > > >[...] > >libtool: compile: gcc -DHAVE_CONFIG_H -I. > >-I/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src -I.. -I. > >-I/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src -ggdb -O2 -pipe > >-Wimplicit-function-declaration > >-fdebug-prefix-map=3D/works/tmp/libsigsegv-2.10-1/build=3D/usr/src/debug= /libsigsegv-2.10-1 > >-fdebug-prefix-map=3D/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10=3D= /usr/src/debug/libsigsegv-2.10-1 > >-c /works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src/handler.c > >-DDLL_EXPORT -DPIC -o .libs/handler.o > >In file included from > >/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src/handler.c:20:0: > >/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src/handler-win32.c: In > >function 'main_exception_filter': > >/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src/handler-win32.c:218= :43: > >error: 'struct _CONTEXT' has no member named 'Esp' > > ExceptionInfo->ContextRecord->Esp =3D new_safe_esp; > > ^ > >/works/tmp/libsigsegv-2.10-1/src/libsigsegv-2.10/src/handler-win32.c:220= :43: > >error: 'struct _CONTEXT' has no member named 'Eip' > > ExceptionInfo->ContextRecord->Eip =3D (unsigned > >long)&stack_overflow_handler; > > ^ > >Makefile:399: set di istruzioni per l'obiettivo "handler.lo" non riuscito > >make[1]: *** [handler.lo] Errore 1 > >make[1]: uscita dalla directory "/works/tmp/libsigsegv-2.10-1/build/src" > >Makefile:344: set di istruzioni per l'obiettivo "install-recursive" non > >riuscito > >make: *** [install-recursive] Errore 1 > > > >Since my Cygwin64 is a fesh installation, I wonder if I missed to > >installe some needed packages... or is that error to be expected on > >Cygwin64? >=20 > I found the problem (or at least I found *a* problem): There's a > configure test "checking whether a fault handler according to POSIX > works", which passes on 32-bit Cygwin but fails on 64-bit Cygwin. > I'm attaching a file containing the configure test. Here's what > happens in the 64-bit case: >=20 > $ gcc -o fault fault.c > $ ./fault.exe > $ echo $? > 1 >=20 > In the 32-bit case, the exit code is 0. >=20 > I don't know if this indicates a Cygwin bug or something wrong with > the test. It indicates a Cygwin bug. Thanks for the report and the testcase. The joke here is, the signal handler function gets called twice for the same exception. Proof is that you can remove the second call to crasher and still sigsegv_handler gets called twice. I see why this happens, but I'm not quite sure yet how to fix it completely. I can easily fix this for the normal case as well as for the case a process gets started by the debugger. But I have trouble as soon as a debugger gets attached to a process after the process already started. Does anybody know if there's a way for a process to be getting notified if a debugger attaches to or detaches from it? Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --ftEhullJWpWg/VHq Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTFJlyAAoJEPU2Bp2uRE+glFsP/Rbqkq+BkcRBfRLS/azeryxJ ldMgPRODEB8MRHsDIKyMl6PfhPncr5IrMV7t9qglBMm6Qrn1Yv5ZBSmDRpSoGnTW WnroYs40A4Jbnu/6DCxtBr5sltfMwQNJ4jciqUJE8a2zWOWov1Cpa3Os8AWxNpLE qepxAmGBxfNih8Zff5eFfqcpFK9jtquGLlL5aXnDvz+hCZ5KhSwhRAcm71yJu45j mJrBjO5Z9u8V6xCVJfJqe6Mtlwttv36kcc1xpugVqGuUEZwlIJJ6UtpOu4PFKdOR taGOtBfLeHAo9Pcfo9avGUQ+zXH0dCNsGvz3ggIsSQ9NFkpTec1zQmScemZnEq/b t0kcpea01xWqkbGnS6aF+//uwnEe5b4TDEs5dm/dF7PGy3ynmFrR5wf35C4ppfSN i3n42/gaH7KeeGhX3G/1fXM6sDCJTE1bEFklN/wtym2Wgfkl2owJL3dkkFGBer0S zTWDvNTHDglj51QaLIotkUKUKc8Mf2x7+XM/hXZOWQWpjxIbQkewMQ3EUYGPbzhX t16lco2lbWNyYZgXdy3IT6ACT2vgVdZ7ezo/Pf7fylhb0SzAMNWK5ibbn+mlQKTW K2ex/7S/Rt401cm8xjoKhOIvajP5sImQyW8jvrDJ+csByy3QdwxsgfIpl8KD6Nou d9+hpVWjvI2FqvGUdZsw =hVI2 -----END PGP SIGNATURE----- --ftEhullJWpWg/VHq--