Skip to content

Commit 1d6693f

Browse files
koct9itorvalds
authored andcommitted
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>
1 parent 5c0198b commit 1d6693f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/decode_stacktrace.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ parse_symbol() {
3737
symbol=${symbol#\(}
3838
symbol=${symbol%\)}
3939

40+
# Strip segment
41+
local segment
42+
if [[ $symbol == *:* ]] ; then
43+
segment=${symbol%%:*}:
44+
symbol=${symbol#*:}
45+
fi
46+
4047
# Strip the symbol name so that we could look it up
4148
local name=${symbol%+*}
4249

@@ -84,7 +91,7 @@ parse_symbol() {
8491
code=${code//$'\n'/' '}
8592

8693
# Replace old address with pretty line numbers
87-
symbol="$name ($code)"
94+
symbol="$segment$name ($code)"
8895
}
8996

9097
decode_code() {

0 commit comments

Comments
 (0)