Page 1 of 1

suggestions for debugging

Posted: Sat Jan 17, 2004 12:25 pm
by shaz
i'm writting my OS which is at its initial stages.i need your help(any link,suggestion) for implementing kernel debugging .
What things should i consider so that i can easily debug my kernel when its size becomes quite large.
i mean what functions should i write for easy debugging.I read some hobby OSes and they dump values of all registers when some exception is generated.But debugging by reading op-codes can be extremly difficult in a huge kernel code.
i need some tips from you on debugging as you are well experienced.

Re:suggestions for debugging

Posted: Sat Jan 17, 2004 2:38 pm
by Pype.Clicker
well, what i do have is a kind of "debug console" collecting much messages and on which i can act (like now stop displaying related to memory management so that i can focus on threads synchronization).

I also do have a collection of "information pannel" that allow me to view the state of system tables such as GDT, page directories, etc. in a convenient way.

now, in case of big problem, i do have a 'panic report' message that shows me register content as well as a backtrace of the current execution. (function call chains).

From there, i can check the symbols map generated by the linker to know in which module the error occured, and then use "objdump -drlS <module.o>" to locate the high-level code line, reverse-engineer register use if necessary to find the source of the bug ...

Re:suggestions for debugging

Posted: Sun Jan 18, 2004 2:16 am
by shaz
where can i download objdump for windows .when i searched google,it gave some confusing links.

Re:suggestions for debugging

Posted: Sun Jan 18, 2004 3:21 am
by Candy
shaz wrote: where can i download objdump for windows .when i searched google,it gave some confusing links.
Use the cygwin, it's with the binutils.