Skip to content

vitaminac/minios

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
October 22, 2021 23:56
cpu
December 25, 2021 22:13
def
May 5, 2021 22:24
November 26, 2019 12:22
December 8, 2022 10:52

Mini Operating System From Zero

Debian Dev Environment Setup

sudo apt update
sudo apt install build-essential nasm gcc gdb gdbserver ccache qemu qemu-system-x86

Debug

Run make debug and then you can use any gdb command.

Debugging with GDB

break

  • b main: puts a breakpoint at the symbol main
  • b f:N: puts a breakpoint at the line N of file f

continue

  • c: continues running the program until the next breakpoint or error

info

  • info break: list breakpoints
  • info registers eax: show the value of specific register

where

  • where: Show call stack
  • where full: Show call stack, also print the local variables in each frame

del

  • del N: remove break point N

step

  • s: runs the next line of the program

next

  • n: Like s, but it does not step into functions

layout asm

  • layout asm: show the assembly and command windows.

stepi

  • si: next instruction

nexti

  • ni: Like si, but it does not step into routines

print

  • p var: print the current value of the variable var.

finish

  • finish: Runs until the current function is finished

list

  • list: print more lines

quit

  • q: quits gdb

VNC

You can access the remote desktop with VNC viewer connecting to "<your-linux-virtual-machine-ip-address>:5900".

Tutorial

Course

Book

Windows

Source Code

Linux

Windows

Emulator

Reference