-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging
I like to debug the kernel with BOCHS. Currently I use version 2.6.2 on Linux (Ubuntu). To use the internal debugger, you will have to build Bochs from source to enable it. You will also have to build the kernel in debug mode, with debug symbols DWARF
After downloading the source, configure like this:
./configure LDFLAGS=-pthread --enable-debugger CPPFLAGS=/usr/include/gtk-2.0
Then 'make' and 'sudo make install' as usual. If you do 'which bochs' you should see it in /usr/local/bin
In the top-level dominos directory, there is a sample bochsrc.txt file, as well as a bochs-run.sh script. These work well for me, but you may want to modify them to fit your own needs.
You can now run 'bochs-run.sh'
Bochs will start in debug mode, which means the machine will be paused and you can enter commands. You should load the kernel symbols with 'ldsym "kernel/joel4/joel4.sym"