-
Step 1: Building XINU
To compile the XINU kernel, run
make
in thecompile
directory as follows:cd compile make depend make
This creates an OS image called
xinu.elf
. -
Step 2: Running and debugging XINU
The XINU image runs on the QEMU emulator machines. To boot up the image, type:
make run
XINU should start running and print messages.
Typing
Ctrl-a
thenc
(notCtrl-c
) will always bring you to "(qemu)" prompt. From there, you can quit by typingq
.To debug XINU, run the image in the debug mode by:
make debug
Then execute GDB in another ssh session:
gdb xinu.elf
In the (gdb) console, connect to the remote server by:
target remote localhost:1234
You can use many debugging features provided by GDB, e.g., adding a break point at the main function:
b main
To run to the next breakpoint, type:
c
The detailed document for GDB can be found here.