qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V1 12/32] vl: pause option


From: Alex Bennée
Subject: Re: [PATCH V1 12/32] vl: pause option
Date: Fri, 31 Jul 2020 10:44:22 +0100
User-agent: mu4e 1.5.5; emacs 28.0.50

Steven Sistare <steven.sistare@oracle.com> writes:

> On 7/30/2020 1:03 PM, Alex Bennée wrote:
>> 
>> Steve Sistare <steven.sistare@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]