diff options
| author | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-01-31 01:35:52 +0300 |
|---|---|---|
| committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-01-31 01:35:52 +0300 |
| commit | 220ed690436e919a523bd8cd0ca803268025d4b6 (patch) | |
| tree | 34f35c6e89eaf42b20c27551f9b89c39dccd8b55 /scripts/decode_stacktrace.sh | |
| parent | b73aebc7a1e0fd9d2a9d8ab7b88ada58bd80bb9f (diff) | |
| parent | 1c470f4f61f3d8d631a0c63f0dc6e2307bd72a5c (diff) | |
| download | linux-220ed690436e919a523bd8cd0ca803268025d4b6.tar.xz | |
Merge drm/drm-next into drm-xe-next
Backmerge drm-next to get the common APIs and refactors as well as
getting the display changes from i915 in xe so the probe order can be
improved.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'scripts/decode_stacktrace.sh')
| -rwxr-xr-x | scripts/decode_stacktrace.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 46fa18b80fc1..17abc4e7a985 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -286,6 +286,18 @@ handle_line() { last=$(( $last - 1 )) fi + # Extract info after the symbol if present. E.g.: + # func_name+0x54/0x80 (P) + # ^^^ + # The regex assumes only uppercase letters will be used. To be + # extended if needed. + local info_str="" + if [[ ${words[$last]} =~ \([A-Z]*\) ]]; then + info_str=${words[$last]} + unset words[$last] + last=$(( $last - 1 )) + fi + if [[ ${words[$last]} =~ \[([^]]+)\] ]]; then module=${words[$last]} # some traces format is "(%pS)", which like "(foo+0x0/0x1 [bar])" @@ -313,9 +325,9 @@ handle_line() { # Add up the line number to the symbol if [[ -z ${module} ]] then - echo "${words[@]}" "$symbol" + echo "${words[@]}" "$symbol ${info_str}" else - echo "${words[@]}" "$symbol $module" + echo "${words[@]}" "$symbol $module ${info_str}" fi } |
