This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] use error, not internal_error, in dwarf2-frame.c


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]