Kernel Debugging: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
→‎Use gdb with Qemu: Use kdbg as a gdb GUI
Line 110: Line 110:


I won't start explaining all the nice things about gdb, but as you can see, it is a very powerful tool for debugging OSes.
I won't start explaining all the nice things about gdb, but as you can see, it is a very powerful tool for debugging OSes.

=== Use kdbg as a gdb GUI ===

[http://www.kdbg.org/ kdbg] brings a nice GUI to gdb. Like with gdb you start have to start your OS with

qemu -s -S <harddrive.img>

To attach kdbg run

kdbg -r localhost:1234 <kernel.bin>

The binary can be the whole elf or a symbol file.


== Develop in hosted environment ==
== Develop in hosted environment ==