Debugging 101

Enable trace messages

See logging.

QEMU exits without a kernel panic message

Use QEMU's logging feature (-d int,cpu_reset) to print the reason.

qemu-system-x86_64 -d int,cpu_reset

Debugging Device Drivers

  • Build QEMU from the source. QEMU device emulation tends to provide a DEBUG macro to enable debug messages. Also, adding printfs by your own helps a lot.
  • Use QEMU's tracing feature.