summaryrefslogtreecommitdiff
path: root/scripts/decode_stacktrace.sh
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2019-04-16 11:50:34 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2019-04-16 11:50:34 +0300
commit95d002e0a34cb0f238abb39987f9980f325d8332 (patch)
treeb8ed70572a55b4e67410f906159f86e8aabb0f6a /scripts/decode_stacktrace.sh
parentd57b39e3ee3cdb4b00452090e386d197980cefc9 (diff)
parent28d618e9ab86f26a31af0b235ced55beb3e343c8 (diff)
downloadlinux-95d002e0a34cb0f238abb39987f9980f325d8332.tar.xz
Merge tag 'drm-intel-next-2019-04-04' into gvt-next
Merge back drm-intel-next for engine name definition refinement and 54939ea0bd85 ("drm/i915: Switch to use HWS indices rather than addresses") that would need gvt fixes to depend on. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'scripts/decode_stacktrace.sh')
-rwxr-xr-xscripts/decode_stacktrace.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 64220e36ce3b..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%+*}
@@ -78,13 +85,13 @@ parse_symbol() {
fi
# Strip out the base of the path
- code=${code//$basepath/""}
+ code=${code//^$basepath/""}
# In the case of inlines, move everything to same line
code=${code//$'\n'/' '}
# Replace old address with pretty line numbers
- symbol="$name ($code)"
+ symbol="$segment$name ($code)"
}
decode_code() {