This project is hosted on GitHub at github.com/xqemu/xqemu.
Debugging Guest Code¶
- QEMU can host a gdb stub! Launch with
-s -S, and with gdb run
target remote localhost:1234
- Protip: You can also attach to it with IDA if you're so inclined. You can then load in a database if you export it as a IDC script!
- XQEMU can emulate a XDK serial port (which with a debug bios hosts KD, as in this and this)! Launch with something like
-device lpc47m157 -serial unix:/tmp/xserial,server. With some effort you can wrestle the unix socket into a vm for with WinDbg. There's also a very barebones perl KD client in scripts/windpl
- apitrace is useful for tracking down rendering bugs.
Debugging XQEMU Itself¶
Depending on the task at hand, it may be necessary to debug XQEMU itself.
Create a project, edit the "Scheme" to run the xqemu binary, then click the run button. Xcode has a nice GUI for analyzing the stack frame and looking at local variables to quickly track down bugs. You can also attach to running processes.
GDB works of course. Eclipse can also be used for those wanting a graphical source-level debugging solution.