Commit 53938ee4 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Ingo Molnar

scripts/decode_stacktrace.sh: Fix address line detection on x86

Kirill reported that the decode_stacktrace.sh script was broken by the
following commit:

  bb5e5ce5 ("x86/dumpstack: Remove kernel text addresses from stack dump")

Fix it by updating the per-line absolute address check to also check for
function-based address lines like the following:

  write_sysrq_trigger+0x51/0x60

I didn't remove the check for absolute addresses because it's still
needed for ARM.
Reported-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
Tested-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <alexander.levin@verizon.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: bb5e5ce5 ("x86/dumpstack: Remove kernel text addresses from stack dump")
Link: http://lkml.kernel.org/r/20161128230635.4n2ofgawltgexgcg@trebleSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 9b032d21
...@@ -139,7 +139,8 @@ handle_line() { ...@@ -139,7 +139,8 @@ handle_line() {
while read line; do while read line; do
# Let's see if we have an address in the line # Let's see if we have an address in the line
if [[ $line =~ \[\<([^]]+)\>\] ]]; then if [[ $line =~ \[\<([^]]+)\>\] ]] ||
[[ $line =~ [^+\ ]+\+0x[0-9a-f]+/0x[0-9a-f]+ ]]; then
# Translate address to line numbers # Translate address to line numbers
handle_line "$line" handle_line "$line"
# Is it a code line? # Is it a code line?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment