From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9817 invoked by alias); 4 Jun 2014 10:28:01 -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 9783 invoked by uid 89); 4 Jun 2014 10:27:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 04 Jun 2014 10:27:53 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id s54ARYcW000524; Wed, 4 Jun 2014 12:27:34 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id s54ARXYL017073; Wed, 4 Jun 2014 12:27:33 +0200 (CEST) Date: Wed, 04 Jun 2014 10:28:00 -0000 Message-Id: <201406041027.s54ARXYL017073@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: gbenson@redhat.com CC: gdb-patches@sourceware.org, aburgess@broadcom.com, xdje42@gmail.com, eliz@gnu.org, fw@deneb.enyo.de, mark.kettenis@xs4all.nl, palves@redhat.com, tromey@redhat.com In-reply-to: <20140604100755.GA7570@blade.nx> (message from Gary Benson on Wed, 4 Jun 2014 11:07:55 +0100) Subject: Re: [PATCH 0/2 v3] Demangler crash handler References: <20140604100755.GA7570@blade.nx> X-SW-Source: 2014-06/txt/msg00147.txt.bz2 > Date: Wed, 4 Jun 2014 11:07:55 +0100 > From: Gary Benson > > Hi all, > > This patch is an updated version of the demangler crash handler I > posted two weeks ago. There are two main changes from the previous > version: > > 1) The signal handler creates a core file before returning. > This ensures that a core file is created at the correct > location. > > 2) I have switched the crash handler to be enabled by default. > I think this is appropriate now that a core file is always > created. > > To make this work correctly I have had to add a new class of > internal problem, which I've called demangler_warning. This > has the same behaviour as internal_warning except that it does > not prompt the user to create a core file because that's already > been done. I know Doug didn't want this but it's necessary to > avoid either overwriting the useful core file with a non-useful > one or confusing the user with a second, non-useful core file. > > I've split this patch into two parts for ease of discussion. The > first patch adds the new internal problem functionality, and the > second patch is the crash handler itself. This differs from the > previous version by the addition of core file generation and in > that it calls demangler_warning instead of internal_warning. > > I would push both patches as one commit. The news file entries > for the commit would be: > > * New options > > maint set catch-demangler-crashes (on|off) > maint show catch-demangler-crashes > Control whether GDB should attempt to catch crashes in the symbol > name demangler. The default is to attempt to catch crashes. If > enabled, the first time a crash is caught, a core file is created, > the offending symbol is displayed and the user is presented with > the option to terminate the current session. > > maint set demangler-warning quit (yes|no|ask) > When GDB catches a crash in the symbol name demangler it can offer > the user the opportunity to both quit GDB and create a core file of > the current GDB session. These options control whether or not to > do either of these. The default is to create a core file and to ask > the user whether to quit. > > * New commands > > maint demangler-warning > Cause GDB to call the internal function demangler_warning and > hence behave as though an internal error in the demangler has > been detected. > > Is this ok to commit? Not for me. You're running too much code between entering the SIGSEGV handler and dumping core for my taste. I still very much agree with Pedro; this should not be necessary. Drop this. Spend your time on fixing the actual bugs.