This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Typo in assert error message causing confusion?
- From: Daniel Zebralla <daniel dot zebralla at zebralla-it dot de>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 2 Oct 2013 04:26:11 -0700 (PDT)
- Subject: Re: Typo in assert error message causing confusion?
- Authentication-results: sourceware.org; auth=none
- References: <1380618091882-245807 dot post at n7 dot nabble dot com> <B1E5ED67-1FE7-43FF-B3A3-E37D58D8A3E8 at linear dot com>
I get your point of view. However, I assume that someone would like to know
what's broken instead of what would be the case if the message would have
not been displayed. If my system stops with a kernel panic and tells me
"Pointer is valid" I would be like -> oO.
As I can see inside eCos source, I'm not the only one understanding those
assertion messages this way, some examples:
CYG_ASSERT( freeret , "Couldn't free!" );
CYG_ASSERT( interr == 0, "internal lock failed!" );
CYG_ASSERT( usertmp->next != NULL, "Couldn't find message queue user" );
CYG_ASSERT( stacksize >= PTHREAD_STACK_MIN, "Inadequate stack size
supplied");
CYG_ASSERT( ticks != 0, "Zero tick count");
To sum it up:
- Some eCos developers use assertion messages to say what failed
- Some eCos developers use assertion messages to say what would have passed
This inconsistency confuses people like me, new to eCos and debugging
something which I don't fully understand yet.
Any further comments/opinions?
- Daniel
--
View this message in context: http://sourceware-org.1504.n7.nabble.com/Typo-in-assert-error-message-causing-confusion-tp245807p245957.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss