This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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 6/6] Add a gdbarch 'print_auxv' method for FreeBSD ABIs.


On 06/16/2016 07:02 AM, John Baldwin wrote:

>  
> +static int
> +fbsd_print_auxv (struct gdbarch *gdbarch, struct ui_file *file, CORE_ADDR type,
> +		 CORE_ADDR val)

Missing intro comment.

> +{
> +  const char *name;
> +  const char *description;
> +  enum auxv_format flavor;
> +
> +  switch (type)
> +    {
> +#define _TAGNAME(tag) #tag
> +#define TAGNAME(tag) _TAGNAME(AT_##tag)
> +#define TAG(tag, text, kind) \
> +      case AT_FREEBSD_##tag: name = TAGNAME(tag); description = text; flavor = kind; break
> +      TAG (EXECPATH, _("Executable path"), str);
> +      TAG (CANARY, _("Canary for SSP"), hex);
> +      TAG (CANARYLEN, ("Length of the SSP canary"), dec);
> +      TAG (OSRELDATE, _("OSRELDATE"), dec);
> +      TAG (NCPUS, _("Number of CPUs"), dec);
> +      TAG (PAGESIZES, _("Pagesizes"), hex);
> +      TAG (PAGESIZESLEN, _("Number of pagesizes"), dec);
> +      TAG (TIMEKEEP, _("Pointer to timehands"), hex);
> +      TAG (STACKPROT, _("Initial stack protection"), hex);
> +    default:
> +      return (0);

Write:

      return 0;

However, with the suggestion in the previous patch, this would
be a direct call to default_print_auxv_entry.

> +    }
> +
> +  fprint_single_auxv (file, name, description, flavor, type, val);
> +  return (1);

  return 1;

Thanks,
Pedro Alves


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