Multitasking OS and kernel with an interactive shell.
-
Run gdb:
$ gdb
-
Load symbol file:
add-symbol-file <root>/build/kernelfull.o 0x100000
-
Set a breakpoint:
break kernel_main
-
Attach the debugger to QEMU:
target remote | qemu-system-x86_64 -S -gdb stdio -hda ./os.bin
Command | Description |
---|---|
c |
Continue |
layout asm |
Enter assembly layout |
layout src |
Enter source layout |
step |
Step program until it reaches a different source line |
stepi |
Step one instruction exactly |
finish |
Complete the current stack frame |