Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Andrew Burgess" <aburgess@broadcom.com>
To: gdb-patches@sourceware.org,	"Tom Tromey" <tromey@redhat.com>
Subject: Re: [PATCH] use error, not internal_error, in dwarf2-frame.c
Date: Thu, 14 Nov 2013 12:26:00 -0000	[thread overview]
Message-ID: <5284B2BB.3090800@broadcom.com> (raw)
In-Reply-To: <1384375392-32110-1-git-send-email-tromey@redhat.com>

On 13/11/2013 8:43 PM, Tom Tromey wrote:
> 
> I think that gdb should not call internal_error for bad DWARF.
> Instead, it should simply throw an ordinary exception.

Sounds reasonable.

> 
> diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
> index e05236f..8f55e9f 100644
> --- a/gdb/dwarf2-frame.c
> +++ b/gdb/dwarf2-frame.c
> @@ -680,8 +680,7 @@ bad CFI data; mismatched DW_CFA_restore_state at %s"),
>  	      break;
>  
>  	    default:
> -	      internal_error (__FILE__, __LINE__,
> -			      _("Unknown CFI encountered."));
> +	      error (_("Unknown CFI encountered."));

I wonder if we could make this error message clearer?  Will an "average"
user understand what a CFI is?  How about something like:

  "Invalid DWARF debugging information: Unknown CFI encountered"

This might give a better idea what is going on.  If you agree then the
same applies to the rest of these errors too.

Just a thought.

Thanks,
Andrew




  parent reply	other threads:[~2013-11-14 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 20:51 Tom Tromey
2013-11-14  9:52 ` Joel Brobecker
2013-11-14 12:26 ` Andrew Burgess [this message]
2013-11-14 18:11   ` Doug Evans

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=5284B2BB.3090800@broadcom.com \
    --to=aburgess@broadcom.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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