From f378e6aed30d9b0e36cca5e873326a7ea3df7d0f Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 1 Jan 2016 16:38:43 +0100 Subject: [PATCH] Set up GDB --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 68bc9fe4..ee6990e0 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ assembly_source_files := $(wildcard src/arch/$(arch)/*.asm) assembly_object_files := $(patsubst src/arch/$(arch)/%.asm, \ build/arch/$(arch)/%.o, $(assembly_source_files)) -.PHONY: all clean run iso cargo +.PHONY: all clean run debug iso cargo gdb all: $(kernel) @@ -28,7 +28,13 @@ clean: @rm -rf build run: $(iso) - @qemu-system-x86_64 -drive format=raw,file=$(iso) + @qemu-system-x86_64 -drive format=raw,file=$(iso) -s + +debug: $(iso) + @qemu-system-x86_64 -drive format=raw,file=$(iso) -s -S + +gdb: + @rust-os-gdb/bin/rust-gdb "build/kernel-x86_64.bin" -ex "target remote :1234" iso: $(iso)