Date: Mon, 27 Mar 1995 16:24:35 +0100 To: djgpp AT sun DOT soe DOT clarkson DOT edu From: mmcmpope AT inet DOT uni-c DOT dk (MouseHouse) Subject: Re: How to debug after playing with timer-int ? >(3) Does anybody have any general advise for how to debug a program involving > interrupt routines. I sometimes try to use edebug (is that what its > called ?) and sometimes it behaves reasonably and sometimes the machine > hangs even before reaching points I know it reaches otherwise. > > I guess that edebug isn't really intended to handle this sort of thing ? > (I did really expect it to.) Is their some other way of doing it (given > that I can't really put prints everywhere 'cos they cause crashes ...) Most everybody will tell you to use some special debugger with serial support, to add some esoteric command-line switch, a million different things. Problem is that serial support, printing etc.. all depends a lot on the normal system resources being avaliable. Years of debugging with graphics and interrupts has taught me not to rely on anything out of my control. So I usually employ a simple color scheme: When the program reaches this point, it changes the background color to red, if this or that condition turns out false, it makes the screen blue... If you absolutely need to see numbers, make your very own printing routine without relying on any predefined routines or system calls. A bit tiresome, but for time-critical stuff like interrupts, debuggers and/or system routines just don't do the job... -Jesper Juul