RE: Cygwin build failure following [PATCH 3/3 v5] Demangler crash handler

Pierre Muller
2014-07-14T16:25:06Z

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Gary Benson
> Envoyé : lundi 14 juillet 2014 13:43
> À : Andreas Schwab
> Cc : Pierre Muller; gdb-patches@sourceware.org; 'Andrew Burgess'; 'Doug
> Evans'; 'Eli Zaretskii'; 'Florian Weimer'; 'Mark Kettenis'; 'Pedro
> Alves'; 'Tom Tromey'; 'Corinna Vinschen'
> Objet : Re: Cygwin build failure following [PATCH 3/3 v5] Demangler
> crash handler
>
> Andreas Schwab wrote:
> > Gary Benson <gbenson@redhat.com> writes:
> > > diff --git a/gdb/cp-support.c b/gdb/cp-support.c
> > > index a8ea6fc..6a09b46 100644
> > > --- a/gdb/cp-support.c
> > > +++ b/gdb/cp-support.c
> > > @@ -1557,7 +1557,9 @@ gdb_demangle (const char *name, int options)
> > > #if defined (HAVE_SIGACTION) && defined (SA_RESTART)
> > > sa.sa_handler = gdb_demangle_signal_handler;
> > > sigemptyset (&sa.sa_mask);
> > > +#ifdef HAVE_SIGALTSTACK
> > > sa.sa_flags = SA_ONSTACK;
> > > +#endif
> >
> > You probably need to initialize sa.sa_flags in any case.
>
> Good spot, thanks Andreas.
>
> Pierre, I've inlined an updated patch below.

I can confirm that the proposed patch
fixes the Cygwin build failure.

Thanks, Gary,

Pierre Muller