From db0d3dff145a33aaf70ba7dc523bd3c69ca2985f Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Tue, 5 Apr 2022 22:00:14 +0200 Subject: [PATCH] Add debug link for kernel symbols --- Makefile | 1 + debug.gdb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 740eb60..811dc31 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ kernel kernel.sym &: $(asmobj) $(gasmobj) $(cobj) linker.ld $(LD) $(LDFLAGS) $(asmobj) $(gasmobj) $(cobj) -o kernel -T linker.ld $(LIBGCC) objcopy --only-keep-debug kernel kernel.sym objcopy --strip-debug kernel + objcopy --add-gnu-debuglink=kernel.sym kernel fd.iso: kernel mkdir -p isodir/boot/grub diff --git a/debug.gdb b/debug.gdb index 2344716..c6e54ae 100644 --- a/debug.gdb +++ b/debug.gdb @@ -1,4 +1,3 @@ -add-symbol-file kernel.sym add-symbol-file userspace/user source custom_gdb_extension.py #For ASM sources