Repository navigation
tools: remove the XTOS core dump reader - #11616
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
What changed in this PR
Removes the legacy XTOS core dump reader tooling that no longer has firmware output to consume, and updates documentation to use Zephyr’s core dump tooling instead.
Changes:
- Deleted
tools/coredumper/scripts (sof-coredump-reader.pyandsof-coredump-to-gdb.sh). - Updated
scripts/sof-target-install.shto stop deploying the removed tools. - Updated
tools/README.mdwith Zephyr-based core dump workflows for Intel ADSP and QEMU.
| File | Description |
|---|---|
| tools/coredumper/sof-coredump-to-gdb.sh | Removed obsolete wrapper script for the deleted XTOS dump reader. |
| tools/coredumper/sof-coredump-reader.py | Removed obsolete XTOS exception-mailbox dump parser and gdb command generator. |
| tools/README.md | Replaced XTOS reader docs with Zephyr core dump guidance for ADSP and QEMU. |
| scripts/sof-target-install.sh | Stops copying removed coredumper tools to targets. |
Review effort: Lite
| cat /sys/kernel/debug/sof/exception > coredump.bin | ||
| zephyr/scripts/coredump/coredump_gdbserver.py build-<platform>/zephyr/zephyr.elf coredump.bin |
There was a problem hiding this comment.
Right, reproduced with a QEMU dump padded to a full slot: coredump_gdbserver.py exits with "Unknown section in log file". Fixed in 5dac6d0 with tools/coredumper/sof-coredump-trim.py, which parses the capture with the Zephyr parser and writes the dump up to the first byte that does not start a section (or starts one out of the fixed Zephyr order, so trailing data cannot replace the registers). The README now runs it between reading /sys/kernel/debug/sof/exception and starting the gdb server.
| ``` | ||
|
|
||
| $ ./sof-coredump-to-gdb.sh sof-tgl dump_file | ||
| On QEMU (`qemu_xtensa`), build with `CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y`. |
There was a problem hiding this comment.
Fixed in dbcd385: the QEMU instructions now enable CONFIG_DEBUG_COREDUMP=y as well as CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y.
sof-coredump-reader.py parsed the XTOS exception dump: a struct sof_ipc_dsp_oops_xtensa register block, the panic file and line, and the raw stack, which XTOS arch_dump_regs() wrote to the exception mailbox. It then drove xt-gdb from the arch_dump_regs_a() symbol. No firmware writes that dump any more, and arch_dump_regs_a() has been removed. The firmware uses the Zephyr core dump support instead. The Intel ADSP builds enable CONFIG_DEBUG_COREDUMP with the memory window backend: on a panic the dump goes to the debug window telemetry slot, the Linux SOF driver prints the registers and the stack, and /sys/kernel/debug/sof/exception returns the raw dump. The Zephyr coredump_gdbserver.py serves that dump to gdb. On QEMU (qemu_xtensa), the logging backend writes the dump to the console and coredump_serial_log_parser.py extracts it. Remove the reader and its xt-gdb wrapper, stop installing them on the target, and describe the Zephyr core dump flow in the tools README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
…ture
On Intel ADSP the Zephyr core dump goes to the telemetry slot of the
debug memory window, and /sys/kernel/debug/sof/exception returns the
whole slot. The dump does not record its length, so the capture ends
with the rest of the slot, and the Zephyr core dump parser rejects it
("Unknown section in log file"), so coredump_gdbserver.py exits before
gdb can connect.
Add sof-coredump-trim.py, which parses the capture with the Zephyr
parser and writes the dump up to the first byte that does not start a
section. Zephyr writes the sections in a fixed order, with a single
architecture block, so a section out of that order also ends the dump:
otherwise data after the dump that looks like a second architecture
block would replace the registers. The cut dump is parsed again before
it is written.
Document the step in the tools README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
4596f9d to
5dac6d0
Compare
PR 11616: test resultsRun date: 2026-12-04 17:26 UTC Tested commit: 5dac6d09083127ae9fa3c04c3b5016b2932ed84f |
kv2019i
left a comment
There was a problem hiding this comment.
Maybe the update of the Zephyr coredump instructions (and the trim tool) could have been a separate PR as the interesting stuff is no logner about removing the XTOS core dump reader, but actually the updated docs and tools. No blockers though

Remove the XTOS core dump reader from
tools/coredumper/, and point the tools README at the Zephyr core dump tools, with a small tool that cuts the Zephyr dump out of an Intel ADSP debug window capture. Follow-up to the review of #11573, which removedarch_dump_regs_a(), the symbol the reader started its backtrace from. Part of #11517.Why remove it instead of updating it
sof-coredump-reader.pyparsed the XTOS exception dump: astruct sof_ipc_dsp_oops_xtensaregister block, the panic file and line, and the raw stack, which XTOSarch_dump_regs()wrote to the exception mailbox. No firmware writes that dump any more, so the reader has no input.The firmware uses the Zephyr core dump support instead, and the Zephyr tools already cover both targets the reader could have been updated for:
CONFIG_DEBUG_COREDUMPwith the memory window backend. On a panic, the dump goes to the debug window telemetry slot after a 4-byte separator. The Linux SOF driver prints the registers and the stack, and/sys/kernel/debug/sof/exceptionreturns the rest of the slot. The dump does not record its length and the Zephyr parser rejects the data after it, so a small new tool,sof-coredump-trim.py, cuts the dump out forzephyr/scripts/coredump/coredump_gdbserver.py.qemu_xtensa): withCONFIG_DEBUG_COREDUMP=yand the logging backend, the dump goes to the console,coredump_serial_log_parser.pyextracts it, and the same gdb server serves it. The Zephyr Xtensa gdb stub supports thedc233ccore.Updating the reader would mean reimplementing the Zephyr dump parser and gdb server; the new tool reuses the Zephyr parser instead.
Changes
sof-coredump-reader.pyand itsxt-gdbwrappersof-coredump-to-gdb.sh.scripts/sof-target-install.shno longer copies them to the target.tools/README.mddescribes the Zephyr core dump flow for Intel ADSP and QEMU.tools/coredumper/sof-coredump-trim.pyparses a debug window capture with the Zephyr parser and writes the dump up to the first byte that does not start a section. A section out of the fixed Zephyr order also ends the dump, so data after the dump that looks like a second architecture block cannot replace the registers. The cut dump is parsed again before it is written.Testing
qemu_xtensa/dc233cwith the logging backend: the console dump was extracted withcoredump_serial_log_parser.py, served withcoredump_gdbserver.py, andxtensa-dc233c_zephyr-elf-gdbstopped at the panic inxtensa_arch_except_epc. WithCONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN, which the Intel builds also use, the backtrace stops after the first frame.sof-coredump-trim.py: the QEMU dump padded to a full 4092-byte slot with zeros, random data and random data starting with each section ID (A,T,F,M). Passing the padded capture straight tocoredump_gdbserver.pyfails with "Unknown section in log file". The tool recovers the original 547-byte dump from every capture, gdb opens the cut dump, and a capture without a dump is rejected.🤖 Generated with Claude Code