debugging help

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
iub

debugging help

Post by iub »

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
hartyl

RE:debugging help

Post by hartyl »

well, i can't call my os-core "huge" but i have still my debugging abilities.
when debugging is write some important values on the screen. but the best for all time is bochs (a pc-emulator). you can take a look at everything, everytime so you can easily find your errors. i think bochs is able to load symbols (maybe your c-code too?) so you can step through the code you are working at (not the disassembled code)
Moose

RE:debugging help

Post by Moose »

The most simplest form of debugging is printing stuff to the screen.

A print statement with hex, ascii, binary and denary support is one of the first things i wrote to my os, even if it is only a development routine, but its help me out tons of times.

As well as that, the actual processor can do some debugging too. Read intel manual 3, chapter 15 - Debugging and Performance Monitoring.

Moose
Post Reply