Steven Sistare <steven.sist...@oracle.com> writes:
> On 7/30/2020 1:03 PM, Alex Bennée wrote: >> >> Steve Sistare <steven.sist...@oracle.com> writes: >> >>> Provide the -pause command-line parameter and the QEMU_PAUSE environment >>> variable to briefly pause QEMU in main and allow a developer to attach gdb. >>> Useful when the developer does not invoke QEMU directly, such as when using >>> libvirt. >> >> How does this differ from -S? > > The -S flag runs qemu to the main loop but does not start the guest. Lots of > code > that you may need to debug runs before you get there. Right - so this is for attaching a debugger to QEMU itself, not using the gdbstub? Why isn't this a problem the calling entity can solve by the way it invoked QEMU? We have similar sort of solutions for debugging our testcases: https://wiki.qemu.org/Features/QTest#Using_debugging_tools_under_the_test_harness I still think: >>> +DEF("pause", HAS_ARG, QEMU_OPTION_pause, \ >>> + "-pause secs Pause for secs seconds on entry to main.\n", >>> QEMU_ARCH_ALL) >>> + >>> +SRST >>> +``--pause secs`` >>> + Pause for a number of seconds on entry to main. Useful for attaching >>> + a debugger after QEMU has been launched by some other entity. >>> +ERST >>> + >> >> It seems like having an option to race with the debugger is just asking >> for trouble. this make the option problematic. -- Alex Bennée