Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gary Benson <gbenson@redhat.com>
Cc: gdb-patches@sourceware.org, aburgess@broadcom.com,
	xdje42@gmail.com, fw@deneb.enyo.de, mark.kettenis@xs4all.nl,
	palves@redhat.com, tromey@redhat.com
Subject: Re: [PATCH 2/2 v2] Demangler crash handler
Date: Mon, 19 May 2014 16:55:00 -0000	[thread overview]
Message-ID: <8361l1d7yx.fsf@gnu.org> (raw)
In-Reply-To: <20140519154822.GA20315@blade.nx>

> Date: Mon, 19 May 2014 16:48:23 +0100
> From: Gary Benson <gbenson@redhat.com>
> Cc: gdb-patches@sourceware.org, aburgess@broadcom.com, xdje42@gmail.com,
>         fw@deneb.enyo.de, mark.kettenis@xs4all.nl, palves@redhat.com,
>         tromey@redhat.com
> 
> > Can't say this option makes sense to me.  Isn't there a way to
> > display the necessary information in a message, even though you
> > catch the signal?
> 
> To clarify, the current situation in GDB is that crashes in the
> demangler are not caught:
> 
>   (gdb) set lang c++
>   (gdb) maint demangle _Z1-Av23*;cG~Wo2Vu
>   Segmentation fault (core dumped)
> 
> With the patch, that is also the default situation.  But with the
> patch, with "maint set catch-demangler-crashes on", a signal handler
> is installed across calls to the demangler, so that if the demangler
> crashes you get something like this:
> 
>   (gdb) set lang c++
>   (gdb) maint set catch-demangler-crashes on
>   (gdb) maint demangle _Z1-Av23*;cG~Wo2Vu
>   /home/gary/work/archer/demangle-crashcatcher/src/gdb/cp-support.c:1590: internal-warning: unable to demangle '_Z1-Av23*;cG~Wo2Vu' (demangler failed with signal 11)
>   A problem internal to GDB has been detected,
>   further debugging may prove unreliable.
>   Quit this debugging session? (y or n) y
>   
>   /home/gary/work/archer/demangle-crashcatcher/src/gdb/cp-support.c:1590: internal-warning: unable to demangle '_Z1-Av23*;cG~Wo2Vu' (demangler failed with signal 11)
>   A problem internal to GDB has been detected,
>   further debugging may prove unreliable.
>   Create a core file of GDB? (y or n) y
>   Aborted (core dumped)

Yes, I knew all that (because I've read all the deliberations here
about this feature).  I'm asking why do we need this option, instead
of having its ON effect by default?

> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -33142,6 +33142,16 @@ Expand symbol tables.
>  If @var{regexp} is specified, only expand symbol tables for file
>  names matching @var{regexp}.
>  
> +@kindex maint set catch-demangler-crashes
> +@kindex maint show catch-demangler-crashes

Please add here

 @cindex demangler crashes

Otherwise, this part is OK.  Thanks.


  reply	other threads:[~2014-05-19 16:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 11:48 Gary Benson
2014-05-19 15:01 ` Eli Zaretskii
2014-05-19 15:48   ` Gary Benson
2014-05-19 16:55     ` Eli Zaretskii [this message]
2014-05-19 19:05       ` Gary Benson
2014-05-19 20:41         ` Pedro Alves
2014-05-20  2:43           ` Eli Zaretskii
2014-05-22 10:37           ` Gary Benson
2014-05-25 12:59           ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8361l1d7yx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=aburgess@broadcom.com \
    --cc=fw@deneb.enyo.de \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=palves@redhat.com \
    --cc=tromey@redhat.com \
    --cc=xdje42@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox