Re: catch SIGSEGV in the demangler

Tom Tromey
2013-01-18T16:31:59Z

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> The original idea was to do return instead of raise:
Pedro> +static void
Pedro> +handle_segv (int sig)
Pedro> +{
Pedro> + struct gdb_exception except;
Pedro> +
Pedro> + if (!in_demangler)
Pedro> + {
Pedro> + signal (sig, SIG_DFL);
Pedro> + return;
Pedro> + }

This works fine, but has the effect of causing gdb to ignore an explicit
'kill -SEGV'. I had to hack "maint dump-me" to really see it work.

Tom