Last active
March 5, 2025 17:31
-
-
Save serghost/3bd56b52c191fc3d9e1bf1c1792599b6 to your computer and use it in GitHub Desktop.
Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/mit-pdos/xv6-public.git | |
Open Makefile, replace line 32 with: | |
TOOLPREFIX = i686-elf- | |
After line 80: | |
CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 && echo -fno-stack-protector) | |
Add: | |
CFLAGS += -Wno-array-bounds | |
CFLAGS += -Wno-infinite-recursion | |
Run: | |
make qemu-gdb | |
In another tab run: | |
lldb | |
Here you can navigate and make breakpoints, i.e: | |
target create kernel | |
gdb-remote 25501 | |
breakpoint set --name main | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment