This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdbarch: Use an anonymous union for target data in `gdbarch_info'
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: gdb-patches at sourceware dot org, Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Tue, 8 Nov 2016 21:20:23 +0000
- Subject: Re: [PATCH] gdbarch: Use an anonymous union for target data in `gdbarch_info'
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.00.1610181615410.31859@tp.orcam.me.uk>
On Tue, Oct 18, 2016 at 05:19:50PM +0100, Maciej W. Rozycki wrote:
> Index: binutils/gdb/gdbarch.sh
> ===================================================================
> --- binutils.orig/gdb/gdbarch.sh 2016-10-18 02:37:31.000000000 +0100
> +++ binutils/gdb/gdbarch.sh 2016-10-18 02:47:30.048973683 +0100
> @@ -1459,7 +1459,12 @@ struct gdbarch_info
> bfd *abfd;
>
> /* Use default: NULL (ZERO). */
> - void *tdep_info;
> + union
> + {
> + struct gdbarch_tdep_info *tdep_info;
> + struct tdesc_arch_data *tdesc_data;
> + int *id;
> + };
>
Patch is good to me. Could you add comments to each field about
when these fields are used?