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: [RFA] Fix printing frame arguments for COFF debug info


> 2009-05-23  Eli Zaretskii  <eliz@gnu.org>
> 
> 	* valprint.c (val_print): If LANGUAGE is "unknown" or "auto" or
> 	"local", fall back on current_language.

The patch looks good, although I'm still unconvinced that it is actually
necessary.  I'm slightly worried about the potential for feeding an
expression to the wrong language (as we've seen a crash a long time
ago when feeding some C++ stuff thinking it was Ada), but we can
actually look into that if it ever happens.

One of the things that you patch does, is also hidding an error that
was actually an internal error.  We're trying to recover nicely from
the situation in order to be more useful for the user, so getting rid
of the error is OK, but I'd probably still emit a complaint.  WDYT?

> --- valprint.c~0	2009-03-21 07:03:53.000000000 +0200
> +++ valprint.c	2009-05-23 13:33:14.062500000 +0300
> @@ -257,6 +257,14 @@ val_print (struct type *type, const gdb_
>        return (0);
>      }
>  
> +  /* If the LANGUAGE argument we received is one of the placeholder
> +     ``languages'', its la_val_print method will throw an error.  To
> +     avoiding that, try falling back on current_language.  */
        ^^^ avoid

-- 
Joel


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