MU Debugger User Guide
MU Debugger is a post-mortem debugger and QEMU-based emulation tool for XCENA’s MU cores. Use GDB to inspect a saved core dump. It can also connect to a running device with --server xcena to set breakpoints, read registers and step a kernel while it executes, as described in Live debugging.
For independent SDK containers, analyze a saved core dump without pausing a live tenant. Stopping an active SDK process in a debugger, or halting its Subs through a live connection, can block the shared device; see the coordinator guide’s limitations.

Installation
The Ubuntu SDK bundle includes mu_debugger and the samples in /usr/local/mu_debugger/sample/. No separate debugger binary installation is required. The openSUSE Leap and RHEL 9 family bundles do not include mu_debugger. The optional analysis-report scripts below have their own Python dependencies. Run mu_debugger --help to check availability.
Usage
The debugger can be launched using the provided mu_debugger binary.
Basic command
mu_debugger [options]
Options:
--elf <file> Path to MU ELF or binary
--mu-elf <file> Path to MU ELF or binary for --app mode
--app <file> Run a PXL/host app before live crash-context debugging
--core <file> Path to XCENA coredump file
--server <qemu|xcena|none> Server to run (default: none)
--client <gdb> Debugger client to run (default: gdb)
--port <port> Port for GDB server (default: 1234)
--device <id> XCENA device id for live crash-context mode (default: 0)
--sub <id|used> MU sub id, or 'used' for app-used subs
(default: used in --app mode, otherwise 0)
--subs <a,b,c> Show the stored context of several subs. The live
session is opened on the first one; the rest are
read-only and not selectable as threads
--at-load Hold the app where its kernel is loaded but has not run,
so a breakpoint can be planted first (needs --app)
--allow-empty-context Attach even when no Sub has stopped yet; needed to
attach to a running application without --app
--gdb-ex <command> Extra GDB command; can be given several times
--verbose Log what the RSP server does
--silent Run in silent mode (default: off)
--config <file> Path to configuration file (default: empty)
--help Show this help message
If coredump is not specified, --server xcena runs live crash-context mode.
.xcoredump Format
An .xcoredump file is an XCENA-specific post-mortem coredump that captures the internal state of MU cores at a specific point in time. It typically includes:
- General-purpose registers (GPRs)
- Program counter (PC)
- Memory image (full or partial)
- Thread context information
- Device metadata
Example: Post-mortem debugging with .xcoredump
This mode analyzes the captured core state in read-only mode. You can inspect memory, registers, and stack traces, but you cannot modify the context.
mu_debugger --elf /usr/local/mu_debugger/sample/elf \
--core /usr/local/mu_debugger/sample/sample.xcoredump
Example: Post-mortem debugging with .xcoredump + QEMU Emulation
This mode combines .xcoredump analysis with QEMU hardware emulation. It enables step execution, memory patching, and context manipulation.
mu_debugger --elf /usr/local/mu_debugger/sample/elf \
--core /usr/local/mu_debugger/sample/sample.xcoredump --server qemu
Example: Analysis Report
Prepare a separate Python environment once, then run the parser to summarize a .xcoredump file. It needs the system site-packages for pypxl; do not reuse the installer’s ~/.xcena-venv.
python3 -m venv --system-site-packages "$HOME/.mu-debugger-venv"
source "$HOME/.mu-debugger-venv/bin/activate"
python3 -m pip install 'capstone>=5,<6' cxxfilt pyelftools
Use this environment for each report (source "$HOME/.mu-debugger-venv/bin/activate"):
python3 /usr/local/mu_debugger/src/coredump_parser.py \
/usr/local/mu_debugger/sample/sample.xcoredump \
--elf /usr/local/mu_debugger/sample/elf
Launch in VS Code
You can integrate mu_debugger into VS Code for seamless debugging with GDB.
This setup allows you to use .xcoredump-based debugging directly through the IDE.
- Configure the ELF and coredump paths in the
vscode.cfgfile.elf=/usr/local/mu_debugger/sample/elf coredump=/usr/local/mu_debugger/sample/sample.xcoredumpThis file is automatically loaded at runtime to configure the debugging session.
-
Open Debug Panel
Open the Run and Debug tab (Ctrl + Shift + D) and select a session to launch. - Start Debugging
PressF5or click Start Debugging to launch the session.
The debugger will automatically load the ELF and .xcoredump, and attach GDB to the emulated target.
Live debugging on a running device
Without --core, --server xcena attaches to a kernel that is executing on the device. GDB stops it where you ask, and you can read its registers, walk its stack and step it one instruction at a time.
Preparing the application
Two environment variables are required on the host application, not on mu_debugger:
PXL_DEBUG_ALLOW=1 PXL_MU_DEBUG=1 ./my_app
PXL_DEBUG_ALLOW=1 | The application consents to being debugged. Without it the device refuses the session. |
PXL_MU_DEBUG=1 | Runs the application’s tasks one at a time in a debug configuration. Throughput drops considerably – use it for debugging only. Very large kernels, and applications whose cluster bitmap excludes cluster 0, fail with InvalidArgument in this mode. |
With PXL_MU_DEBUG=1 each Sub runs its own copy of the kernel, so a session and its breakpoints cover only the Sub you attach to. Tasks of the same job on other Subs keep running and do not stop.
Attaching
# attach to an application that is already running
mu_debugger --elf mu_kernel.mubin --server xcena --allow-empty-context [--device N --sub N]
# run the application and open a session where it faults
mu_debugger --app ./my_app --mu-elf mu_kernel.mubin --server xcena -- <app args>
The first form needs --allow-empty-context because the server otherwise refuses a Sub that has never stopped, which is the state of every Sub after a reboot. --app and --at-load set it for you.
--app starts the host application and waits: the session opens where the application hits an MU fault, which is the crash-context case. An application that runs cleanly simply finishes. To plant a breakpoint before the kernel runs, use --at-load below. Arguments after -- are passed through to the application.
Stopping before the first instruction
A kernel starts running the moment it is loaded, so a plain attach always lands somewhere in the middle. --at-load holds the load until you are ready:
mu_debugger --app ./my_app --mu-elf mu_kernel.mubin --server xcena --at-load -- <app args>
You get a GDB prompt with the load held. Set your breakpoints, then release it:
(gdb) break my_kernel_function
(gdb) golive
This holds the first load only. An application that loads a kernel again is held at the second load with nothing left to release it, and the session ends with SessionLost as described under Limitations. Quit GDB to free the application, or set MU_DEBUGGER_APP_HOLD_TIMEOUT_SECONDS so later holds time out on their own – note that the same timeout applies to the first hold, so set it longer than you need to plant your breakpoints.
A session
(gdb) break mix
Breakpoint 1 at 0x20264: file mu_kernel.cpp, line 22.
(gdb) continue
Thread 1 hit Breakpoint 1, mix (value=452213294, round=0) at mu_kernel.cpp:22
(gdb) bt
(gdb) info args
(gdb) info locals
(gdb) stepi
(gdb) finish
(gdb) delete
(gdb) break accumulate
(gdb) continue
(gdb) detach
bt | Call stack, down to _start. |
info args | Arguments of the stopped frame. |
stepi | One instruction. |
finish | Run to the caller and show the return value. |
delete then break accumulate | Move the breakpoint elsewhere. |
detach | End the session. |
Type the commands as shown, without trailing comments. GDB treats # as a comment only at the start of a line, so break accumulate # move it looks for a function whose name includes the comment, fails, and leaves you with no breakpoint set – see the first limitation below.
An application you attached to keeps running after detach. In --app mode mu_debugger owns the application: quitting GDB releases any hold and then waits MU_DEBUGGER_APP_RELEASE_TIMEOUT_SECONDS (30 by default) for it to finish, terminating it if it does not.
What is available
break | Software breakpoints, on whichever Sub you attach to. |
tbreak | A one-shot breakpoint. GDB removes it once it is hit, so keep another breakpoint set before continuing. |
continue, stepi, finish | Run control. |
bt, info args, info locals, print, x | Read-only inspection of the stopped context. |
info threads | The MU threads of the stopped Sub. |
The stopped context is read-only: memory and register writes are rejected.
Limitations
Keep at least one breakpoint set while the kernel runs. Deleting every breakpoint and continuing lets the kernel run unconstrained with the session still attached, which can abort the running launch. End the session with detach rather than a final continue.
Hardware watchpoints are not supported. GDB accepts watch, rwatch and awatch, but the next continue fails to insert them and keeps failing while they exist. Remove them with delete N, keeping your breakpoints.
Hardware breakpoints are not supported in this release. Use break.
Live debugging is not available in independent SDK containers. The coordinator rejects the request; use a saved core dump there.
Halting a Sub blocks the device. The Subs you stop are unavailable to every other process until you continue or detach. On a shared device, see the coordinator guide’s limitations.
A fault stop cannot be resumed. After a kernel assert, an illegal instruction or a divide by zero, continue returns the same stop. Inspect it, then detach.
Loading a kernel ends the session. When the application loads a kernel again, the session ends with SessionLost. A continue that is waiting then prints Remote failure reply: E01 and shows the previous stop again – the kernel is not stopped there. Breakpoint requests after that fail with Cannot access memory. Attach again after the load.
Only the state captured at the stop can be read. x and print are served from the snapshot taken when the Sub stopped, which holds the registers and two MU data windows. The MU code is included only with --at-load; otherwise x/i $pc and disassemble fail with Cannot access memory. Device memory buffers passed to the kernel are outside it and cannot be read, and neither can a host address printed by the host application.
Useful flags
--allow-empty-context | Attach to a Sub that has never stopped. Needed whenever you attach without --app. |
--verbose | Logs what the RSP server does – packets it acts on, breakpoints it plants, and what each stop names. Start here when a stop shows something unexpected. |
--gdb-ex <command> | Extra GDB command at startup. Repeatable. |
--port <port> | Serve on another port (default 1234). |