I’m attempting to debug a kernel driver using kgdb or jtag
per several websites that i have visited, kernel config options that need to be enabled
CONFIG_KGDB
CONFIG_KGDB_SERIAL_CONSOLE
CONFIG_FRAME_POINTER
CONFIG_KALLSYMS
CONFIG_KALLSYMS_ALL
CONFIG_MAGIC_SYSRQ
CONFIG_DEBUG_INFO
however when starting gdb with vmlinux, i get no symbols found
gdb-multiarch -q ./vmlinux
so what am i missing??
the vmlinux file size are about the same after enabling the configs below
without symbols enabled (default .config, no menuconfig changes)
vmlinux size: 46,716,104
with symbols enabled (or so i think)
vmlinux size: 46,881,488
These are the configs that are enabled
CONFIG_KALLSYMS=y
CONFIG_DEBUG_INFO_NONE=y
CONFIG_KGDB=y
CONFIG_KGDB_HONOUR_BLOCKLIST=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDB_KDB=y
CONFIG_KDB_DEFAULT_ENABLE=0x1
CONFIG_KDB_KEYBOARD=y
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
CONFIG_VMLINUX_MAP=y
CONFIG_CONSOLE_POLL=y
CONFIG_DEBUG_INFO does not exist, but
CONFIG_DEBUG_INFO_NONE=y does
should CONFIG_DEBUG_INFO_NONE not be enabled ??
Feel free to enable this… it’s still an outrages file size increase when hosting all our linux-image*.deb’s…
Debian defaults to:
6.15.3-1~exp1
#
# Compile-time checks and compiler options
#
CONFIG_DEBUG_INFO=y
CONFIG_AS_HAS_NON_CONST_ULEB128=y
# CONFIG_DEBUG_INFO_NONE is not set
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_DWARF5 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
# CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
CONFIG_MODULE_ALLOW_BTF_MISMATCH=y
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
CONFIG_STRIP_ASM_SYMS=y
# CONFIG_READABLE_ASM is not set
# CONFIG_HEADERS_INSTALL is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_VMLINUX_MAP is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# end of Compile-time checks and compiler options