From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16107 invoked by alias); 19 May 2014 16:55:03 -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 15713 invoked by uid 89); 19 May 2014 16:55:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout23.012.net.il Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 May 2014 16:55:00 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0N5T00A00YX94500@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Mon, 19 May 2014 19:54:57 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5T00AP3YZL2740@a-mtaout23.012.net.il>; Mon, 19 May 2014 19:54:57 +0300 (IDT) Date: Mon, 19 May 2014 16:55:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 2/2 v2] Demangler crash handler In-reply-to: <20140519154822.GA20315@blade.nx> To: 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 Reply-to: Eli Zaretskii Message-id: <8361l1d7yx.fsf@gnu.org> References: <20140519114801.GA31140@blade.nx> <83iop1dd8e.fsf@gnu.org> <20140519154822.GA20315@blade.nx> X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00359.txt.bz2 > 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? > --- 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.