Features/gdbstub: Difference between revisions

From QEMU
No edit summary
(Mention sstepbits)
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:


and debug your program
and debug your program
== QEMU Extensions ==
When running under TCG you can configure the debugger to not trigger timers and IRQs while debugging using the "qemu.sstepbits" custom message.


== Developer Notes ==
== Developer Notes ==


The gdbstub doesn't support all the features of the gdbserver protocol which is documented
The gdbstub doesn't support all the features of the gdbserver protocol which is documented [https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html here]

Latest revision as of 12:44, 20 May 2019

QEMU support a gdbserver known as the gdbstub. With this you can debug programs in both linux-user and system emulation modes.

Invoking

   $QEMU $QEMU_ARGS -s -S

Will configure the system and stop at the first instruction. You can then attach with:

   gdb $BINARY -ex "target remote localhost:1234"

and debug your program

QEMU Extensions

When running under TCG you can configure the debugger to not trigger timers and IRQs while debugging using the "qemu.sstepbits" custom message.

Developer Notes

The gdbstub doesn't support all the features of the gdbserver protocol which is documented here