From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19435 invoked by alias); 19 May 2014 19:05: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 19400 invoked by uid 89); 19 May 2014 19:05:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 May 2014 19:05:39 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4JJ5WTf004769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 May 2014 15:05:32 -0400 Received: from blade.nx (ovpn-116-75.ams2.redhat.com [10.36.116.75]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4JJ5UoB030940; Mon, 19 May 2014 15:05:31 -0400 Received: by blade.nx (Postfix, from userid 1000) id 5E706262412; Mon, 19 May 2014 20:05:30 +0100 (BST) Date: Mon, 19 May 2014 19:05:00 -0000 From: Gary Benson To: Eli Zaretskii Cc: gdb-patches@sourceware.org, aburgess@broadcom.com, xdje42@gmail.com, fw@deneb.enyo.de, mark.kettenis@xs4all.nl, palves@redhat.com, tromey@redhat.com Subject: Re: [PATCH 2/2 v2] Demangler crash handler Message-ID: <20140519190530.GA22506@blade.nx> References: <20140519114801.GA31140@blade.nx> <83iop1dd8e.fsf@gnu.org> <20140519154822.GA20315@blade.nx> <8361l1d7yx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8361l1d7yx.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00369.txt.bz2 Eli Zaretskii wrote: > > Date: Mon, 19 May 2014 16:48:23 +0100 > > From: Gary Benson > > Cc: gdb-patches@sourceware.org, aburgess@broadcom.com, xdje42@gmail.com, > > fw@deneb.enyo.de, mark.kettenis@xs4all.nl, palves@redhat.com, > > tromey@redhat.com > > > > > Can't say this option makes sense to me. Isn't there a way to > > > display the necessary information in a message, even though you > > > catch the signal? > > > > To clarify, the current situation in GDB is that crashes in the > > demangler are not caught: > > > > (gdb) set lang c++ > > (gdb) maint demangle _Z1-Av23*;cG~Wo2Vu > > Segmentation fault (core dumped) > > > > With the patch, that is also the default situation. But with the > > patch, with "maint set catch-demangler-crashes on", a signal > > handler is installed across calls to the demangler, so that if the > > demangler crashes you get something like this: > > > > (gdb) set lang c++ > > (gdb) maint set catch-demangler-crashes on > > (gdb) maint demangle _Z1-Av23*;cG~Wo2Vu > > /home/gary/work/archer/demangle-crashcatcher/src/gdb/cp-support.c:1590: internal-warning: unable to demangle '_Z1-Av23*;cG~Wo2Vu' (demangler failed with signal 11) > > A problem internal to GDB has been detected, > > further debugging may prove unreliable. > > Quit this debugging session? (y or n) y > > > > /home/gary/work/archer/demangle-crashcatcher/src/gdb/cp-support.c:1590: internal-warning: unable to demangle '_Z1-Av23*;cG~Wo2Vu' (demangler failed with signal 11) > > A problem internal to GDB has been detected, > > further debugging may prove unreliable. > > Create a core file of GDB? (y or n) y > > Aborted (core dumped) > > Yes, I knew all that (because I've read all the deliberations here > about this feature). I'm asking why do we need this option, instead > of having its ON effect by default? Ah, my apologies. On by default is my preference--it seems to work, and it doesn't rob performance--but I don't think that will to be accepted because there's no way to do this without (sig)longjmp, and that isn't safe to call from a signal handler. A disabled-by-default catcher is at least somewhat helpful in triaging all these demangler bugs that are coming in now people are starting to use C++11 features. > > --- a/gdb/doc/gdb.texinfo > > +++ b/gdb/doc/gdb.texinfo > > @@ -33142,6 +33142,16 @@ Expand symbol tables. > > If @var{regexp} is specified, only expand symbol tables for file > > names matching @var{regexp}. > > > > +@kindex maint set catch-demangler-crashes > > +@kindex maint show catch-demangler-crashes > > Please add here > > @cindex demangler crashes > > Otherwise, this part is OK. Thanks. Thank you. Gary -- http://gbenson.net/