This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2 v3] Demangler crash handler
- From: Doug Evans <xdje42 at gmail dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Andrew Burgess <aburgess at broadcom dot com>, Florian Weimer <fw at deneb dot enyo dot de>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, Pedro Alves <palves at redhat dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Wed, 4 Jun 2014 18:11:16 -0700
- Subject: Re: [PATCH 2/2 v3] Demangler crash handler
- Authentication-results: sourceware.org; auth=none
- References: <20140604100755 dot GA7570 at blade dot nx> <20140604100957 dot GC7570 at blade dot nx> <834n017z8w dot fsf at gnu dot org> <20140604133603 dot GC10121 at blade dot nx> <83sink7pww dot fsf at gnu dot org> <20140604142844 dot GB11730 at blade dot nx> <CAP9bCMQpqUR=PYJgPyZ-rdhdykJhU31mLgH8raR5dPQnMC9yEw at mail dot gmail dot com> <20140604182529 dot GA14897 at blade dot nx>
On Wed, Jun 4, 2014 at 11:25 AM, Gary Benson <gbenson@redhat.com> wrote:
> Doug Evans wrote:
>> On Wed, Jun 4, 2014 at 7:28 AM, Gary Benson <gbenson@redhat.com> wrote:
>> > Eli Zaretskii wrote:
>> > > > From: Gary Benson <gbenson@redhat.com>
>> > > >
>> > > > Eli Zaretskii wrote:
>> > > > > > From: Gary Benson <gbenson@redhat.com>
>> > > > > >
>> > > > > > Eli pointed out that SIGSEGV is an ANSI-standard signal
>> > > > > > but I found various other SIGSEGV checks in GDB
>> > > > >
>> > > > > They should all be removed.
>> > > >
>> > > > Ok, I'll do this. Should I commit the change as obvious?
>> > >
>> > > I think so, yes.
>> >
>> > Ok, I'll do that.
>>
>> Are we talking about #ifdef SIGSEGV in, e.g., common/signals.c?
>
> Yes.
>
>> If one goes down this path, I think the patch while perhaps
>> "obvious" would become a bit involved (why just SEGV?) and
>> thus the obviousness diminishes.
>> I think it diminishes to a point where the obviousness is gone.
>> Please submit any such patch for review.
>
> Having started looking into this I am inclined to agree.
>
> I couldn't find an authoritative list, but the Linux kernel sources
> indicate that SIGINT, SIGILL, SIGABRT, SIGFPE, SIGSEGV and SIGTERM
> are ANSI. Eli said that list agreed with his references, so I'll
> work on unwrapping those.
>
> I will post the patch for review.
One thing that I think should be considered is that we'll go from the
simple state of "just ifdef every signal" in places like
common/signals.c to having some signals you are required to not ifdef
and some you do, and needing to know which category every signal fits
in. I don't have a strong opinion, but I'm ok with the status quo.