History

scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE

At least for ARM64 kernels compiled with the crosstoolchain from Debian/stretch or with the toolchain from kernel.org the line number is not decoded correctly by 'decode_stacktrace.sh': $ echo "[ 136.513051] f1+0x0/0xc [kcrash]" | \ CROSS_COMPILE=/opt/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux- \ ./scripts/decode_stacktrace.sh /scratch/linux-arm64/vmlinux \ /scratch/linux-arm64 \ /nfs/debian/lib/modules/4.20.0-devel [ 136.513051] f1 (/linux/drivers/staging/kcrash/kcrash.c:68) kcrash If addr2line from the toolchain is used the decoded line number is correct: [ 136.513051] f1 (/linux/drivers/staging/kcrash/kcrash.c:57) kcrash

Manuel Traut committed 7 years ago

Commit c04e32e1 parent 35109551 file · +1 −1Browse files

Showing the changes to scripts/decode_stacktrace.sh (1 of 1 file). Show all

Unified · Split

scripts/decode_stacktrace.sh+1−1
@@ -73,7 +73,7 @@ parse_symbol() { · 72 unmodified lines
73 if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then73 if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then
74 local code=${cache[$module,$address]}74 local code=${cache[$module,$address]}
75 else75 else
76 local code=$(addr2line -i -e "$objfile" "$address")76 local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address")
77 cache[$module,$address]=$code77 cache[$module,$address]=$code
78 fi78 fi
79 79