This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 01/12] btrace: add struct btrace_data
- 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
- Date: Wed, 05 Nov 2014 20:44:46 +0000
- Subject: Re: [PATCH 01/12] btrace: add struct btrace_data
- Authentication-results: sourceware.org; auth=none
- References: <1405346196-1804-1-git-send-email-markus dot t dot metzger at intel dot com> <1405346196-1804-2-git-send-email-markus dot t dot metzger at intel dot com>
Hi Markus,
On 07/14/2014 02:56 PM, Markus Metzger wrote:
> + default:
> + gdb_xml_error (parser, _("Btrace format error."));
> + return;
> + }
gdb_xml_error throws, so the return is dead.
On 07/14/2014 02:56 PM, Markus Metzger wrote:
> +
> +const char *
> +btrace_format_string (enum btrace_format format)
> +{
> + switch (format)
> + {
> + case BTRACE_FORMAT_NONE: return "No or unknown format";
> + case BTRACE_FORMAT_BTS: return "Intel(R) Branch Trace Store";
Please put the return statements on their own lines. Also, I
think at least the first string should go through _() for i18n.
> + }
> +
> + internal_error (__FILE__, __LINE__, _("Unknown branch trace format"));
> +}
Thanks,
Pedro Alves