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 5/5] btrace: maintenance commands


On 06/23/2015 09:16 AM, Markus Metzger wrote:
> Add maintenance commands that help debugging the btrace record target.
> The following new commands are added:

Looks good to me, with the minor nits pointed out below addressed.


>  }
> @@ -2192,3 +2235,682 @@ make_cleanup_btrace_data (struct btrace_data *data)
>  {
>    return make_cleanup (do_btrace_data_cleanup, data);
>  }
> +
> +#if defined (HAVE_LIBIPT)
> +
> +/* Print a single packet.  */
> +
> +static void
> +pt_print_packet (const struct pt_packet *packet)
> +{
> +  switch (packet->type)
> +    {
> +    default:
> +      printf_unfiltered ("[??: %x]", packet->type);

I think the missing _() will result in ARI warnings.
You can use extra ()'s to suppress them, like:

     printf_unfiltered (("[??: %x]"), packet->type);


> +      break;
> +
> +    case ppt_psb:
> +      printf_unfiltered ("psb");
> +      break;

etc.

> +btrace clear-packet-history' to clear and recompute the existing history."),
> +			   NULL, NULL, &maint_btrace_pt_set_cmdlist,
> +			   &maint_btrace_pt_show_cmdlist);

Please add a show callback.

Thanks,
Pedro Alves


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