From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18591 invoked by alias); 13 Jul 2014 16:11:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 18526 invoked by uid 89); 13 Jul 2014 16:11:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.222.218) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 13 Jul 2014 16:11:39 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id 31BF32217C1; Sun, 13 Jul 2014 18:11:36 +0200 (CEST) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id 1F6BF2217F7; Sun, 13 Jul 2014 18:11:36 +0200 (CEST) Received: from md14.u-strasbg.fr (md14.u-strasbg.fr [130.79.200.249]) by mr8.u-strasbg.fr (Postfix) with ESMTP id 5FFF92217C1; Sun, 13 Jul 2014 18:11:25 +0200 (CEST) Received: from ms11.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md14.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id s6DGBLe5008902 ; Sun, 13 Jul 2014 18:11:22 +0200 Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (Authenticated sender: mullerp) by ms11.u-strasbg.fr (Postfix) with ESMTPSA id 83E271FD90; Sun, 13 Jul 2014 18:11:11 +0200 (CEST) From: "Pierre Muller" To: "'Gary Benson'" , Cc: "'Andrew Burgess'" , "'Doug Evans'" , "'Eli Zaretskii'" , "'Florian Weimer'" , "'Mark Kettenis'" , "'Pedro Alves'" , "'Tom Tromey'" , "'Corinna Vinschen'" References: <20140609152229.GA27494@blade.nx> <20140609152434.GD27494@blade.nx> In-Reply-To: <20140609152434.GD27494@blade.nx> Subject: Cygwin build failure following [PATCH 3/3 v5] Demangler crash handler Date: Mon, 14 Jul 2014 00:31:00 -0000 Message-ID: <000901cf9eb5$16841da0$438c58e0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00311.txt.bz2 Hi Gary, I think your patch generates build failure on cygwin32: ../../../binutils-gdb/gdb/cp-support.c: In function 'gdb_demangle': ../../../binutils-gdb/gdb/cp-support.c:1560:21: erreur: 'SA_ONSTACK' undeclared (first use in this function) sa.sa_flags = SA_ONSTACK; ^ ../../../binutils-gdb/gdb/cp-support.c:1560:21: note: each undeclared identifier is reported only once for each function it appears in Makefile:1075: recipe for target 'cp-support.o' failed The reason is that SA_ONSTACK is not defined in cygwin's /usr/include/signal.h header whereas SA_RESTART is defined in signal header, and HAVE_SIGACTION is set in config.h > +#if defined (HAVE_SIGACTION) && defined (SA_RESTART) > + sa.sa_handler = gdb_demangle_signal_handler; > + sigemptyset (&sa.sa_mask); > + sa.sa_flags = SA_ONSTACK; > + sigaction (SIGSEGV, &sa, &old_sa); > +#else > + ofunc = (void (*)()) signal (SIGSEGV, > gdb_demangle_signal_handler); > +#endif A simple patch would probably be to add a separate check #ifdef SA_ONSTACK sa.sa_flags = SA_O?STACK; #endif But I honestly don't know enough about Cygwin signal emulation to know if this is a correct fix or not. Maybe Corinna Vinschen can comment on this? Pierre Muller