Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
[linux-2.6-block.git] / scripts / decode_stacktrace.sh
index 98a7d63a723e3bf49b8d4542ea5d5da090ca64c3..bcdd45df3f5127a160b3c79f835502a47e1a169b 100755 (executable)
@@ -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() {