[PATCH 0/2] Demangler crash handler

Tom Tromey tromey@redhat.com
Tue May 13 19:39:00 GMT 2014


>>>>> "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



More information about the Gdb-patches mailing list