From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: Cygwin build failure following [PATCH 3/3 v5] Demangler crash handler
Date: Mon, 14 Jul 2014 08:52:00 -0000 [thread overview]
Message-ID: <20140714083643.GA10872@calimero.vinschen.de> (raw)
In-Reply-To: <000901cf9eb5$16841da0$438c58e0$@muller@ics-cnrs.unistra.fr>
[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]
On Jul 13 18:11, Pierre Muller wrote:
> 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?
Right, Cygwin doesn't support SA_ONSTACK yet. It should be
possible to add, but there are no immediate plans to do so.
As for the above, wouldn't it be better to add something like
#ifndef SA_ONSTACK
#define SA_ONSTACK 0
#endif
to some header?
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-07-14 8:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 15:22 [PATCH 0/3 " Gary Benson
2014-06-09 15:23 ` [PATCH 1/3 v5] Add new internal problem for demangler warnings Gary Benson
2014-06-09 16:19 ` Eli Zaretskii
2014-06-09 15:24 ` [PATCH 3/3 v5] Demangler crash handler Gary Benson
2014-06-09 16:20 ` Eli Zaretskii
2014-06-09 18:25 ` Gary Benson
2014-07-14 0:31 ` Cygwin build failure following " Pierre Muller
2014-07-14 8:52 ` Corinna Vinschen [this message]
2014-07-14 12:10 ` Gary Benson
2014-07-14 8:54 ` Gary Benson
2014-07-14 10:28 ` Andreas Schwab
2014-07-14 12:03 ` Gary Benson
2014-07-14 16:13 ` Tom Tromey
2014-07-14 17:52 ` Pierre Muller
2014-06-09 15:24 ` [PATCH 2/3 v5] Refactor and expose core-dumping functionality Gary Benson
2014-06-11 20:41 ` [PATCH 0/3 v5] Demangler crash handler Tom Tromey
2014-06-11 21:03 ` Mark Kettenis
2014-06-19 8:23 ` [COMMITTED PATCH " Gary Benson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140714083643.GA10872@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).