Skip to content

Commit 3b29411

Browse files
dianderstorvalds
authored andcommitted
scripts/gdb: handle split debug for vmlinux
This is related to two previous changes. Commit dfe4529 ("scripts/gdb: find vmlinux where it was before") and commit da036ae ("scripts/gdb: handle split debug"). Although Chrome OS has been using the debug suffix for modules for a while, it has just recently started using it for vmlinux as well. That means we've now got to improve the detection of "vmlinux" to also handle that it might end with ".debug". Link: https://lkml.kernel.org/r/20211028151120.v2.1.Ie6bd5a232f770acd8c9ffae487a02170bad3e963@changeid Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d5d2c51 commit 3b29411

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/gdb/linux/symbols.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def load_all_symbols(self):
148148
# drop all current symbols and reload vmlinux
149149
orig_vmlinux = 'vmlinux'
150150
for obj in gdb.objfiles():
151-
if obj.filename.endswith('vmlinux'):
151+
if (obj.filename.endswith('vmlinux') or
152+
obj.filename.endswith('vmlinux.debug')):
152153
orig_vmlinux = obj.filename
153154
gdb.execute("symbol-file", to_string=True)
154155
gdb.execute("symbol-file {0}".format(orig_vmlinux))

0 commit comments

Comments
 (0)