aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/decode_stacktrace.sh
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2019-03-05 18:41:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-06 00:07:13 -0500
commit1d6693fb9d157f64a71be8741c83305782cd98bc (patch)
treee8c5359833214d303f30b399a40b0546e3f811c2 /scripts/decode_stacktrace.sh
parent5c0198b6fb73867dea296a69a944a4fdbceff3d8 (diff)
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/decode_stacktrace.sh')
-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() {
37 symbol=${symbol#\(} 37 symbol=${symbol#\(}
38 symbol=${symbol%\)} 38 symbol=${symbol%\)}
39 39
40 # Strip segment
41 local segment
42 if [[ $symbol == *:* ]] ; then
43 segment=${symbol%%:*}:
44 symbol=${symbol#*:}
45 fi
46
40 # Strip the symbol name so that we could look it up 47 # Strip the symbol name so that we could look it up
41 local name=${symbol%+*} 48 local name=${symbol%+*}
42 49
@@ -84,7 +91,7 @@ parse_symbol() {
84 code=${code//$'\n'/' '} 91 code=${code//$'\n'/' '}
85 92
86 # Replace old address with pretty line numbers 93 # Replace old address with pretty line numbers
87 symbol="$name ($code)" 94 symbol="$segment$name ($code)"
88} 95}
89 96
90decode_code() { 97decode_code() {