Subj : Re: Not debugging? To : comp.programming,comp.lang.java.programmer,comp.lang.lisp From : Greg Menke Date : Thu Aug 25 2005 12:58 am "Phlip" writes: > Greg Menke wrote: > > > Its quite hard and maybe impossible to write unit tests for some (new) > > things; OS bootloaders, device drivers, interrupt handlers, etc. In > > some circumstances, a debugger can be used. Otherwise you have to do it > > the old fashioned way; diagnostic counters, printks, bus analyzers, > > sometimes even logic analyzers. > > > > Unit tests are great, but they also have their limits. > > Don't use the debugger to delay the inevitable: Writing an emulator for your > CPU. Sure... that'll help debug drivers on bizzaro hardware with incomplete/inaccurate datasheets & interrupt/context switch routines suffering from various race conditions. Sometimes you just have to bite the bullet and debug right on the metal because of heisenbugs if nothing else. Care to guarantee that the emulator duplicates the bugs & timing characteristics of the real thing? Gregm .