This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/2] Demangler crash handler


Tom Tromey wrote:
> >>>>> "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.

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]