make:fix debug target

This commit is contained in:
Mathieu Maret 2018-11-09 10:50:20 +01:00
parent 7633e54663
commit 4e93b8c26b

View File

@ -2,9 +2,9 @@
CPPFLAGS = -MMD CPPFLAGS = -MMD
AS=nasm AS=nasm
ASFLAGS += -f elf32 ASFLAGS += -f elf32
LDFLAGS += -g -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector LDFLAGS += -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector
CFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector CFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector
CXXFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie CXXFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie
SUBDIRS := core drivers tests SUBDIRS := core drivers tests
@ -44,8 +44,10 @@ self_test: clean kernel
test:kernel test:kernel
qemu-system-x86_64 -kernel $< qemu-system-x86_64 -kernel $<
debug: CFLAGS += -g -Og
debug: CXXFLAGS += -g -Og
debug:kernel kernel.sym debug:kernel kernel.sym
qemu-system-x86_64 -s -S -kernel kernel qemu-system-x86_64 -s -S -kernel kernel&
gdb -s kernel.sym -ex "target remote localhost:1234" gdb -s kernel.sym -ex "target remote localhost:1234"
clean: clean: