The patch titled Subject: gdb: lx-symbols: do not error out on monolithic build has been added to the -mm mm-nonmm-unstable branch. Its filename is gdb-lx-symbols-do-not-error-out-on-monolithic-build.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/gdb-lx-symbols-do-not-error-out-on-monolithic-build.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Etienne Buira <etienne.buira@xxxxxxx> Subject: gdb: lx-symbols: do not error out on monolithic build Date: Fri, 8 Nov 2024 17:45:32 +0100 This avoids spurious message: (gdb) lx-symbols loading vmlinux No source file named kernel/module/main.c. Link: https://lkml.kernel.org/r/Zy5ALByQtpO-ddh4@Z926fQmE5jqhFMgp6 Signed-off-by: Etienne Buira <etienne.buira@xxxxxxx> Cc: Andrew Ballance <andrewjballance@xxxxxxxxx> Cc: Kieran Bingham <kbingham@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/gdb/linux/modules.py | 3 +++ scripts/gdb/linux/symbols.py | 3 +++ 2 files changed, 6 insertions(+) --- a/scripts/gdb/linux/modules.py~gdb-lx-symbols-do-not-error-out-on-monolithic-build +++ a/scripts/gdb/linux/modules.py @@ -19,6 +19,9 @@ from linux import cpus, utils, lists, co module_type = utils.CachedType("struct module") +def has_modules(): + return utils.gdb_eval_or_none("modules") is not None + def module_list(): global module_type modules = utils.gdb_eval_or_none("modules") --- a/scripts/gdb/linux/symbols.py~gdb-lx-symbols-do-not-error-out-on-monolithic-build +++ a/scripts/gdb/linux/symbols.py @@ -178,6 +178,9 @@ lx-symbols command.""" self.load_all_symbols() + if not modules.has_modules(): + return + if hasattr(gdb, 'Breakpoint'): if self.breakpoint is not None: self.breakpoint.delete() _ Patches currently in -mm which might be from etienne.buira@xxxxxxx are gdb-lx-symbols-do-not-error-out-on-monolithic-build.patch