[PATCH v3] arc: Select CPU model properly before disassembling

Simon Marchi simon.marchi@polymtl.ca
Thu Jun 15 21:12:00 GMT 2017


On 2017-06-15 15:20, Anton Kolesov wrote:
> @@ -2041,6 +2067,31 @@ arc_gdbarch_init (struct gdbarch_info info,
> struct gdbarch_list *arches)
>    if (tdep->jb_pc >= 0)
>      set_gdbarch_get_longjmp_target (gdbarch, arc_get_longjmp_target);
> 
> +  /* Disassembler options.  Enforce CPU if it was specified in XML 
> target
> +     description, otherwise use default method of determining CPU (ELF 
> private
> +     header).  */
> +  if (info.target_desc != NULL)
> +    {
> +      const struct bfd_arch_info *tdesc_arch
> +	= tdesc_architecture (info.target_desc);
> +      if (tdesc_arch != NULL)
> +	{
> +	  free (arc_disassembler_options);

Nit: Use xfree instead of free.

You can fix that and push directly.

Thanks!

Simon



More information about the Gdb-patches mailing list