This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix -trace-save crash when argument is missing
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 17 Oct 2016 16:36:49 -0400
- Subject: Re: [PATCH] Fix -trace-save crash when argument is missing
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <20161014202536.21670-1-simon.marchi@ericsson.com> <CAH=s-PPCUQfNuyK-j8GiG6fbF1NN8Qhi2jUniwFxaQSgeL1TQg@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 16-10-17 04:08 PM, Yao Qi wrote:
> HI Simon,
> Patch is good to me. A nit below,
>
> On Fri, Oct 14, 2016 at 4:25 PM, Simon Marchi <simon.marchi@ericsson.com> wrote:
>> +
>> + if (oind >= argc)
>
> Nit: if (argc - oind != 1)
>
>> + error (_("Argument required (file in which to save trace data)"));
>> +
Good idea, otherwise giving too many arguments still works, when it
shouldn't. I'll change the error message to:
"Exactly one argument required ..."
Thanks.