From 3d84eccc4383d2166eeeff6ba1bb67cc57c5a2f6 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 29 Apr 2025 13:40:41 +0100 Subject: [PATCH] Revive GDB source code by enabling debug info for kernel >= v5.18 Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/318 --- linux_config/default | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linux_config/default b/linux_config/default index ad751b4..0363154 100644 --- a/linux_config/default +++ b/linux_config/default @@ -10,8 +10,14 @@ CONFIG_OVERLAY_FS=y # https://cirosantilli.com/linux-kernel-module-cheat#squashfs CONFIG_SQUASHFS=y -# GDB debugging. +## GDB debugging. + +# https://unix.stackexchange.com/questions/712513/why-is-the-flag-config-debug-info-reset-when-building-the-linux-kernel +# < 5.18 CONFIG_DEBUG_INFO=y +# >= 5.18 +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y + CONFIG_DEBUG_KERNEL=y CONFIG_GDB_SCRIPTS=y