Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gdb: lx-symbols: do not error out on monolithic build

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@free.fr>
Cc: Andrew Ballance <andrewjballance@gmail.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Etienne Buira and committed by
Andrew Morton
2c259a91 45dac195

+6
+3
scripts/gdb/linux/modules.py
··· 19 19 module_type = utils.CachedType("struct module") 20 20 21 21 22 + def has_modules(): 23 + return utils.gdb_eval_or_none("modules") is not None 24 + 22 25 def module_list(): 23 26 global module_type 24 27 modules = utils.gdb_eval_or_none("modules")
+3
scripts/gdb/linux/symbols.py
··· 178 178 179 179 self.load_all_symbols() 180 180 181 + if not modules.has_modules(): 182 + return 183 + 181 184 if hasattr(gdb, 'Breakpoint'): 182 185 if self.breakpoint is not None: 183 186 self.breakpoint.delete()