scripts: sof-crash-decode: support debug_stream.py exception format#11025
Open
jsarha wants to merge 1 commit into
Open
scripts: sof-crash-decode: support debug_stream.py exception format#11025jsarha wants to merge 1 commit into
jsarha wants to merge 1 commit into
Conversation
The debug_stream.py tool outputs exception records in a format that differs from the QEMU format the decoder originally targeted: - Register values can be (nil) instead of 0x0, e.g. 'A4 (nil)' - Backtrace entries are on separate lines after 'Backtrace:' rather than all on a single line - Additional registers LCOUNT and THREADPTR are present Update the parser to handle both formats: - Fix (nil) regex: the trailing word boundary anchor failed on the closing parenthesis; split hex and decimal into separate capture groups to avoid the issue - Parse backtrace entries across multiple lines after the Backtrace: header, stopping when a line contains non-backtrace content - Add LCOUNT and THREADPTR to the accepted register list The existing single-line backtrace and QEMU register formats continue to work unchanged. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
jsarha
requested review from
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
July 22, 2026 16:19
Contributor
There was a problem hiding this comment.
Pull request overview
Updates scripts/sof-crash-decode.py to parse crash logs produced by debug_stream.py in addition to the original QEMU-oriented format, including (nil) register values, multi-line backtraces, and additional registers.
Changes:
- Extend accepted register whitelist to include
LCOUNTandTHREADPTR. - Update standard-format register regex to properly parse
(nil)as zero and avoid word-boundary issues. - Expand backtrace parsing to support both single-line and multi-line
Backtrace:formats.
Comment on lines
+189
to
+193
| for match in bt_pattern.finditer(bt_rest): | ||
| # Stop if we hit a line that doesn't look like backtrace data | ||
| preceding = bt_rest[:match.start()] | ||
| # Allow only whitespace/newlines between entries | ||
| last_newline = preceding.rfind('\n') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The debug_stream.py tool outputs exception records in a format that differs from the QEMU format the decoder originally targeted:
Update the parser to handle both formats:
The existing single-line backtrace and QEMU register formats continue to work unchanged.