suggestions for debugging

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shaz

suggestions for debugging

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:suggestions for debugging

Post 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 ...
shaz

Re:suggestions for debugging

Post by shaz »

where can i download objdump for windows .when i searched google,it gave some confusing links.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:suggestions for debugging

Post 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.
Post Reply