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: Yao Qi <yao at codesourcery dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org
- Date: Fri, 07 Mar 2014 13:27:13 +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> <531749BA dot 8050806 at redhat dot com> <5318456D dot 3010709 at codesourcery dot com> <53186842 dot 9030704 at redhat dot com> <5319938B dot 60402 at codesourcery dot com>
On 03/07/2014 09:38 AM, Yao Qi wrote:
> On 03/06/2014 08:21 PM, Pedro Alves wrote:
>> > AFAICS, get_number handles negative numbers. E.g.,
>> >
> Yes, get_number handles negative, but is it expected for get_number
> to handle negative?
Nothing in a name like "get number" suggests to me only positive
numbers would be returned. I think it should be up to the
caller to handle whether the returned value is valid in
that context.
--
Pedro Alves