This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] use error, not internal_error, in dwarf2-frame.c
- From: "Andrew Burgess" <aburgess at broadcom dot com>
- To: gdb-patches at sourceware dot org, "Tom Tromey" <tromey at redhat dot com>
- Date: Thu, 14 Nov 2013 11:23:39 +0000
- Subject: Re: [PATCH] use error, not internal_error, in dwarf2-frame.c
- Authentication-results: sourceware.org; auth=none
- References: <1384375392-32110-1-git-send-email-tromey at redhat dot 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