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] gdbarch: Use an anonymous union for target data in `gdbarch_info'


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?


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