[PATCH 01/12] btrace: add struct btrace_data

Pedro Alves palves@redhat.com
Wed Nov 5 20:44:00 GMT 2014


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



More information about the Gdb-patches mailing list