From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 504 invoked by alias); 6 Jun 2014 19:27:56 -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 492 invoked by uid 89); 6 Jun 2014 19:27:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 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; Fri, 06 Jun 2014 19:27:54 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s56JRiUt029324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 6 Jun 2014 15:27:45 -0400 Received: from blade.nx (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s56JRgjn023798; Fri, 6 Jun 2014 15:27:43 -0400 Received: by blade.nx (Postfix, from userid 1000) id B06C1262405; Fri, 6 Jun 2014 20:27:41 +0100 (BST) Date: Fri, 06 Jun 2014 19:27:00 -0000 From: Gary Benson To: Florian Weimer Cc: gdb-patches@sourceware.org, Andrew Burgess , Doug Evans , Eli Zaretskii , Mark Kettenis , Pedro Alves , Tom Tromey Subject: Re: [PATCH 3/3 v4] Demangler crash handler Message-ID: <20140606192741.GA6811@blade.nx> References: <20140605130140.GA20572@blade.nx> <20140605130358.GD20572@blade.nx> <87a99pewec.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a99pewec.fsf@mid.deneb.enyo.de> X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00336.txt.bz2 Florian Weimer wrote: > * Gary Benson: > > + sigaction (SIGSEGV, &sa, &old_sa); > > + crash_signal = SIGSETJMP (gdb_demangle_jmp_buf); > > + sigaction (SIGSEGV, &old_sa, NULL); > > That's quite a bit of additional work for each demangler invocation. > Is this visible with things like tab completion? I tested this a while back: it's not noticable. FWIW I did time gdb -nx -batch \ /usr/lib64/libreoffice/program/soffice.bin \ -ex "start" -ex "complete b" > /dev/null That invokes the demangler some 3,100,000 times. I don't remember the exact times but they were of the order of 50s in both cases. Thanks, Gary -- http://gbenson.net/