From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10453 invoked by alias); 14 May 2014 09:15:20 -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 10438 invoked by uid 89); 14 May 2014 09:15:19 -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; Wed, 14 May 2014 09:15:18 +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 s4E9FHFU023563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 14 May 2014 05:15:17 -0400 Received: from blade.nx (ovpn-116-68.ams2.redhat.com [10.36.116.68]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4E9FG4a011214; Wed, 14 May 2014 05:15:16 -0400 Received: by blade.nx (Postfix, from userid 1000) id 4985226234A; Wed, 14 May 2014 10:15:15 +0100 (BST) Date: Wed, 14 May 2014 09:15:00 -0000 From: Gary Benson To: Tom Tromey Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH 0/2] Demangler crash handler Message-ID: <20140514091515.GD4974@blade.nx> References: <20140509100656.GA4760@blade.nx> <201405091120.s49BKO1f010622@glazunov.sibelius.xs4all.nl> <20140509153305.GA13345@blade.nx> <20140513102035.GA17805@blade.nx> <87vbt9foyc.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vbt9foyc.fsf@fleche.redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00195.txt.bz2 Tom Tromey wrote: > >>>>> "Gary" == Gary Benson writes: > > Gary> char * > Gary> gdb_demangle (const char *name, int options) > Gary> { > [...] > Gary> + sigaction (SIGSEGV, &sa, &old_sa); > [...] > Gary> + crash_signal = SIGSETJMP (gdb_demangle_jmp_buf); > [...] > Gary> + sigaction (SIGSEGV, &old_sa, NULL); > > This adds two calls to sigaction and a call to sigsetjmp to every > demangling invocation. > > I wonder whether the performance cost of this is noticeable; and if > so, how large the effect is. I tested this before I mailed the patch: it's not noticable. FWIW I did time gdb -nx -batch \ /usr/lib64/libreoffice/program/soffice.bin \ -ex "start" -ex "complete b" > /dev/null Cheers, Gary -- http://gbenson.net/