diff options
| author | Maxime Ripard <mripard@kernel.org> | 2025-02-06 11:59:35 +0300 |
|---|---|---|
| committer | Maxime Ripard <mripard@kernel.org> | 2025-02-06 11:59:35 +0300 |
| commit | 2c1ed907520c50326b8f604907a8478b27881a2e (patch) | |
| tree | 98eca0295007ae5a9e28e2ac3f532e185e2802eb /scripts/decode_stacktrace.sh | |
| parent | 41a2d8286c905614f29007f1bc8e652d54654b82 (diff) | |
| parent | ecee4d0695067ae04959b121028b42a588e75370 (diff) | |
| download | linux-2c1ed907520c50326b8f604907a8478b27881a2e.tar.xz | |
Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes
Merge the few remaining patches stuck into drm-misc-next-fixes.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
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 } |
