Path: ...!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams Newsgroups: comp.lang.c Subject: Re: dbg_break macro Date: Fri, 7 Jun 2024 08:46:17 -0300 Organization: A noiseless patient Spider Lines: 34 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 07 Jun 2024 13:46:17 +0200 (CEST) Injection-Info: dont-email.me; posting-host="9d872bac7ba674665629f70e0cfcb319"; logging-data="2170710"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Exe8zQTZYEdL4sLl7IEE5imb2VQbBvc8=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:t0pCaGu9313m7PJUhyCZtI5L3MA= Content-Language: en-US In-Reply-To: Bytes: 1770 On 07/06/2024 04:55, David Brown wrote: > Certainly dbg_break is a better name, IMHO.  But I'd want a reason for > the halt, especially if you are not running the code under a debugger at > the time. I have many samples of the usage of assert(0) being "debug break, check this!, it can be an error" if (condition1) { //... } else if (condition2) { //... } else if (condition3) { #warning TODO case 3 not implemented dbg_break("TODO case 3 not implemented"); } if (ResourceNotAvailable()) { dbg_break("really unexpected"); return -1; } etc