summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2019-03-05 15:41:34 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-05 21:07:13 -0800
commit1d6693fb9d157f64a71be8741c83305782cd98bc (patch)
treee8c5359833214d303f30b399a40b0546e3f811c2 /scripts
parent5c0198b6fb73867dea296a69a944a4fdbceff3d8 (diff)
downloadlinux-1d6693fb9d157f64a71be8741c83305782cd98bc.tar.bz2
scripts/decode_stacktrace.sh: handle RIP address with segment
decode line: RIP: 0010:khugepaged+0x2a2/0x2280 into RIP: 0010:khugepaged (mm/khugepaged.c:1885) Link: http://lkml.kernel.org/r/154660071227.52726.15645307951282727605.stgit@buzz Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/decode_stacktrace.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 98a7d63a723e..bcdd45df3f51 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -37,6 +37,13 @@ parse_symbol() {
symbol=${symbol#\(}
symbol=${symbol%\)}
+ # Strip segment
+ local segment
+ if [[ $symbol == *:* ]] ; then
+ segment=${symbol%%:*}:
+ symbol=${symbol#*:}
+ fi
+
# Strip the symbol name so that we could look it up
local name=${symbol%+*}
@@ -84,7 +91,7 @@ parse_symbol() {
code=${code//$'\n'/' '}
# Replace old address with pretty line numbers
- symbol="$name ($code)"
+ symbol="$segment$name ($code)"
}
decode_code() {