Difference between revisions of "Debugging QEMU"

From Xen
(Capturing tribal knowledge on invoking QEMU using gdb for debugging)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
There are rare times when debugging problems in the Xne Project software may mean you will want to run QEMU under a debugger.
+
There are rare times when debugging problems in the Xen Project software may mean you will want to run QEMU under a debugger.
   
To run gdb on qemu-dm, remplace the /usr/lib/xen/bin/qemu-dm by a script:
+
To run gdb on qemu-dm, replace the /usr/lib/xen/bin/qemu-dm by a script:
   
 
#!/bin/sh
 
#!/bin/sh
Line 8: Line 8:
 
And run gdb. `target remote localhost 1234` to connect to gdbserver.
 
And run gdb. `target remote localhost 1234` to connect to gdbserver.
   
With recent versions of Xen (4.1 and following), you can specify a different device model in the config file instead of replacing the default binary.
+
With recent versions of Xen Project software (4.1 and following), you can specify a different device model in the config file instead of replacing the default binary.
   
 
== REFERENCES ==
 
== REFERENCES ==
Line 15: Line 15:
 
* https://lists.gnu.org/archive/html/qemu-devel/2011-12/msg02575.html
 
* https://lists.gnu.org/archive/html/qemu-devel/2011-12/msg02575.html
   
[[Category:Developer]]
+
[[Category:Developers]]

Latest revision as of 14:33, 27 February 2015

There are rare times when debugging problems in the Xen Project software may mean you will want to run QEMU under a debugger.

To run gdb on qemu-dm, replace the /usr/lib/xen/bin/qemu-dm by a script:

#!/bin/sh
exec gdbserver 0.0.0.0:1234 /usr/lib/xen/bin/qemu-dm.bak $@

And run gdb. `target remote localhost 1234` to connect to gdbserver.

With recent versions of Xen Project software (4.1 and following), you can specify a different device model in the config file instead of replacing the default binary.

REFERENCES