This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/5] btrace: maintenance commands
- From: Pedro Alves <palves at redhat dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: gdb-patches at sourceware dot org, Eli Zaretskii <eliz at gnu dot org>
- Date: Tue, 30 Jun 2015 13:57:02 +0100
- Subject: Re: [PATCH 5/5] btrace: maintenance commands
- Authentication-results: sourceware.org; auth=none
- References: <1435047418-21611-1-git-send-email-markus dot t dot metzger at intel dot com> <1435047418-21611-6-git-send-email-markus dot t dot metzger at intel dot com>
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