]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
scripts/decode_stacktrace.sh: guess path to modules
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fri, 7 Aug 2020 06:17:41 +0000 (23:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:21 +0000 (11:33 -0700)
commit431151b64af6c8ebec85ee1db3597b56a613f526
tree713d4ee98f3ce32c11d05eb67a7a38334ec81f18
parentecda6e27fa834b2aa37fc9ad49f89b80e9ee8f97
scripts/decode_stacktrace.sh: guess path to modules

Try to find module in directory with vmlinux (for fresh build).  Then try
standard paths where debuginfo are usually placed.  Pick first file which
have elf section '.debug_line'.

Before:

$ echo 'tap_open+0x0/0x0 [tap]' |
  ./scripts/decode_stacktrace.sh /usr/lib/debug/boot/vmlinux-5.4.0-37-generic
WARNING! Modules path isn't set, but is needed to parse this symbol
tap_open+0x0/0x0 tap

After:

$ echo 'tap_open+0x0/0x0 [tap]' |
  ./scripts/decode_stacktrace.sh /usr/lib/debug/boot/vmlinux-5.4.0-37-generic
tap_open (drivers/net/tap.c:502) tap

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Sasha Levin <sashal@kernel.org>
Link: http://lkml.kernel.org/r/159282923068.248444.5461337458421616083.stgit@buzz
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/decode_stacktrace.sh