Article View: news.software.readers
Article #228594Having something fail if-and-only-if the debugger is Not running !
From: Jeffβ²Relf
Date: Sat, 10 Jan 2009 10:20
Date: Sat, 10 Jan 2009 10:20
32 lines
2461 bytes
2461 bytes
β I miss the IDE's I used to be able to afford, though, and their debuggers in particular. β, you told me. I use Visual Studio's debugger to scan through my code, giving it more thought, in the context of its data. Unfortunately, the debugger pads allocations on the heap, thus preventing certain β bad read address β errors. Nothing worse than: having something fail if-and-only-if the debugger is Not running ! When that happens, as it did to me today, I thought: β OK, what did I change recently ? β. Sure enough, a recent change introduced a Bad bug. β Encoded words β start with the β =? β prefix. Encoded Words convert 8-bit chars ( UTF-8 ) into 7-bit ASCII. ( Most Chinese and Russian posts use raw 8-bit chars in their headers, not encoded words β as well they should ) To scan for the β =? β prefix, I erroneously wrote: β While( Ch != '=' && Ch2 != '?' ) β; but I meant: β While( Ch != '=' || Ch2 != '?' ) β. The β While( Should_Loop ) β thingy is a β macro β, a text replacement, which expects P ( see below ) to point to the first character in the null-terminated string ( Ch and Ch2 are integers ): #define While( Should_Loop ) Ch = 1 , P -- ; \ while ( Ch && ( Ch = * ++ P, Ch2 = ! Ch ? 0 : P[ 1 ], Should_Loop ) )
Technical Details
Message-ID:
<Jeff_Relf@Seattle.2009_Jan.10|2.20am|b>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news-1.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<ccb63$495fcd4c$5ed00124$4874@cache3.tilbu1.nb.home.nl> <Jeff_Relf@Seattle.2009_Jan.3|7.53pm|Y> <20090103233926.46cd1151@prezmyra.remarqs.net> <Jeff_Relf@Seattle.2009_Jan.4|2.01pm|l> <MPG.23cae50029946735989692@127.0.0.1> <qy7gwvrsg9q5$.1ft1dyzp4iui4$.dlg@40tude.net>Show Full Headers
Complete Article Headers
Message-ID: <Jeff_Relf@Seattle.2009_Jan.10|2.20am|b> Subject: Having something fail if-and-only-if the debugger is Not running ! Date: Sat, 10 Jan 2009 10:20:32 +0000 From: Jeffβ²Relf <Jeff_Relf@Seattle.Test> References: <ccb63$495fcd4c$5ed00124$4874@cache3.tilbu1.nb.home.nl> <Jeff_Relf@Seattle.2009_Jan.3|7.53pm|Y> <20090103233926.46cd1151@prezmyra.remarqs.net> <Jeff_Relf@Seattle.2009_Jan.4|2.01pm|l> <MPG.23cae50029946735989692@127.0.0.1> <qy7gwvrsg9q5$.1ft1dyzp4iui4$.dlg@40tude.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news-1.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: alt.free.newsservers,news.software.readers Lines: 32 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net JoLnP8CJN6t8t5ik1CbPnA2PJXrMsvVrd1nh7Z0H/NlQZ5z+CA Cancel-Lock: sha1:WQuH8KuHqxj0VExjFi3FoTZhL9E= User-Agent: JeffRelf.F-M.FM/X.ZIP