[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [alliance] [Fwd: [freedows-chat] Re: <important info> The Project,SourceForge, The Future]
On Fri, 14 Jan 2000, Alexander Kellett wrote:
> Ramon van Handel wrote:
> >
> > What I did before I used GDB is "bug cornering". Place the command:
> >
> > asm( "cli; hlt" );
> >
> > Somewhere in the code around where you think it's going wrong. If it
> > hangs before it crashes, you're too early; if it crashes, you're too late.
> > Move up the clihlt until you've cornered the exact location of the crash.
> > That usually won't necessarily make you find the bug directly, but it'll
> > at least give you a place to start...
>
> Thanks!, i haven't done anything like this before :)
>
I used to print a number (or any other chr) in the top left
corner of the screen along with this. just put few numbers
and somewhere in the half a cli/hlt pair. then have a try and
move cli/hlt to the first or second half of code after the
reboot. this way I reduced number of reboots to a minimum.
i thing this is the best way of debugging the code without
debuger, or debugging the debugger itself. perhaps, there is
one more choice. you can slow down the code execution in
some critical places by very long empty loops.
sloker
sloker@telnet.sk
-
Alliance: http://www.allos.org/
Archive: http://humbolt.nl.linux.org/lists/