This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA v4] (Ada) Fix frame argument printing when using auto language mode
- From: Pedro Alves <palves at redhat dot com>
- To: Xavier Roirand <roirand at adacore dot com>, gdb-patches at sourceware dot org
- Cc: brobecker at adacore dot com
- Date: Fri, 23 Feb 2018 17:44:07 +0000
- Subject: Re: [RFA v4] (Ada) Fix frame argument printing when using auto language mode
- Authentication-results: sourceware.org; auth=none
- References: <1519393613-22706-1-git-send-email-roirand@adacore.com>
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