catch SIGSEGV in the demangler

Tom Tromey tromey@redhat.com
Fri Jan 18 16:31:00 GMT 2013


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



More information about the Gdb-patches mailing list