This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3 v4] Demangler crash handler
- From: Gary Benson <gbenson at redhat dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: gdb-patches at sourceware dot org, Andrew Burgess <aburgess at broadcom dot com>, Doug Evans <xdje42 at gmail dot com>, Eli Zaretskii <eliz at gnu dot org>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, Pedro Alves <palves at redhat dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Fri, 6 Jun 2014 20:27:41 +0100
- Subject: Re: [PATCH 3/3 v4] Demangler crash handler
- Authentication-results: sourceware.org; auth=none
- References: <20140605130140 dot GA20572 at blade dot nx> <20140605130358 dot GD20572 at blade dot nx> <87a99pewec dot fsf at mid dot deneb dot enyo dot de>
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/