This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/2] Demangler crash handler
- From: Tom Tromey <tromey at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 13 May 2014 13:39:23 -0600
- Subject: Re: [PATCH 0/2] Demangler crash handler
- Authentication-results: sourceware.org; auth=none
- References: <20140509100656 dot GA4760 at blade dot nx> <201405091120 dot s49BKO1f010622 at glazunov dot sibelius dot xs4all dot nl> <20140509153305 dot GA13345 at blade dot nx> <CAP9bCMRmZOcMtdKfZZHVCdYat3MqiaK8-RWGzJ3SQW7MViSr6w at mail dot gmail dot com> <20140513102035 dot GA17805 at blade dot nx>
>>>>> "Gary" == Gary Benson <gbenson@redhat.com> 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.
If it is too large we could perhaps arrange to do the sigaction calls
just once and see if that helps.
Tom