A multitasking operating system and kernel with an interactive shell.
bless - graphical hexadecimal Gtk# editor.
Edit the FILEs as a sequence of bytes, allowing read/write, search, pattern finding, efficient query-replace, multi-tabbing, customized data-views, plugins, and many other features. Using bless command:
bless ./bin/LavaOS.imgqemu-system-x86_64 -hda ./bin/LavaOS.img./bin/cross/bin/$TARGET-gcc --version # For compile C files.
./bin/cross/bin/$TARGET-g++ --version # For compile C++ files.
./bin/cross/bin/$TARGET-ld # Linker.nasm -f bin file_name.asm -o file_name.binTo disassemble it, simply using ndisasm command:
ndisasm boot.binemu-system-x86_64 -hda file_name.bin -S -gdb stdioNOTE: We should use kernel.elf (kernel image) to add symbol instead of using disk image.
First, entering to gdb mode:
gdbAdding traceable symbol file:
add-symbol-file /bin/kernel.o 0x0100000Set break point in symbol:
break kernel_entry_pointStart debugging with remote target:
target remote | qemu-system-x86_64 -hda ./bin/LavaOS.img -S -gdb stdioSwitching to assembly:
layout asmAnd step by step. prints out registers in both raw format (hex) and natural format in gdb:
info registersgdbIn gdb:
add-symbol-file ./src/kernel/core/kernel.o 0x0100000
target remote | qemu-system-x86_64 -hda ./bin/LavaOS.img -S -gdb stdio
# Set break point in file-line
break kernel.cc:21
# continue
c
# print value of ptr variable
print ptrsudo mount -t vfat ./bin/LavaOS.img /mnt/d/
# do some thing ...
sudo umount /mnt/d/