This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/4] Error on bad count number
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Wed, 05 Mar 2014 15:58:50 +0000
- Subject: Re: [PATCH 2/4] Error on bad count number
- Authentication-results: sourceware.org; auth=none
- References: <1394023608-10761-1-git-send-email-yao at codesourcery dot com> <1394023608-10761-3-git-send-email-yao at codesourcery dot com> <20140305142939 dot GB16858 at adacore dot com>
On 03/05/2014 02:29 PM, Joel Brobecker wrote:
>> GDB is quiet for these invalid input like this
>>
>> (gdb) enable count 1.1 1
>> (gdb)
>>
>> This patch is to check the input number is valid, and emit error if
>> input number isn't valid. With this patch, it becomes:
>>
>> (gdb) enable count 1.1 1
>> Bad count number '1.1 1'
>>
>> gdb:
>>
>> 2014-03-05 Yao Qi <yao@codesourcery.com>
>>
>> * breakpoint.c (enable_count_command): Emit error if 'count'
>> is zero.
>>
>> gdb/testsuite:
>>
>> 2014-03-05 Yao Qi <yao@codesourcery.com>
>>
>> * gdb.base/ena-dis-br.exp: Test bad count number.
>
> I had a slight hesitation here, as we are now going to actively
> reject "enable count 0 1" where it used to be accepted. But since
> it makes little sense, and does not work, I think that's OK.
> Example of it not working:
I had the same thought. I wondered whether 0 was meant to
remove the enable count, but the docs don't say anything
about it. Is there another way to disable the count, and
bring back the disposition to enabled? If not, I wonder
whether using 0 for that would be a good idea?
--
Pedro Alves