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 v4] (Ada) Fix frame argument printing when using auto language mode


On 02/23/2018 01:46 PM, Xavier Roirand wrote:

> diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
> index a486919..5bfa16d 100644
> --- a/gdb/ada-valprint.c
> +++ b/gdb/ada-valprint.c
> @@ -33,6 +33,8 @@
>  #include "objfiles.h"
>  #include "target-float.h"
>  
> +extern const struct language_defn ada_language_defn;
> +

I think this is no longer needed.

>  static int print_field_values (struct type *, const gdb_byte *,
>  			       int,
>  			       struct ui_file *, int,
> @@ -1208,7 +1210,7 @@ ada_val_print (struct type *type,
>      {
>        ada_val_print_1 (type, embedded_offset, address,
>  		       stream, recurse, val, options,
> -		       current_language);
> +		       language_def (language_ada));

ada_val_print_1 is only ever called here, which means that
the language parameter could be eliminated and the
hardcoding of language_ada pushed further down.
Then ada_val_print_gnat_array is always passed
language_ada too, etc., etc.

Thanks,
Pedro Alves


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