Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-13 Thread Paolo Bonzini
evel@nongnu.org > Sent: Wednesday, October 12, 2016 8:38:15 PM > Subject: Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour > > On Wed, Oct 12, 2016 at 03:55:18PM +0200, Claudio Imbrenda wrote: > > On 12/10/16 15:15, David Hildenbrand wrote: > > >&

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-12 Thread David Hildenbrand
On Wed, Oct 12, 2016 at 03:55:18PM +0200, Claudio Imbrenda wrote: > On 12/10/16 15:15, David Hildenbrand wrote: > >>> +for (cx = 0; ccpus && ccpus[cx]; cx++) { > >>> +cpu_single_step(cpu, 0); > > > > This looks suspicious > > why? we set all cpus to single step, since

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 15:55, Claudio Imbrenda wrote: >>> +for (cx = 0; ccpus && ccpus[cx]; cx++) { >>> +cpu_single_step(cpu, 0); >> > >> > This looks suspicious > why? we set all cpus to single step, since that is the default, and then > we clear the single-step

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-12 Thread Claudio Imbrenda
On 12/10/16 15:15, David Hildenbrand wrote: >>> +for (cx = 0; ccpus && ccpus[cx]; cx++) { >>> +cpu_single_step(cpu, 0); > > This looks suspicious why? we set all cpus to single step, since that is the default, and then we clear the single-step property from all CPUs

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-12 Thread David Hildenbrand
> > +if (def == 0) { > > +for (cx = 0; scpus && scpus[cx]; cx++) { > > +cpu_single_step(scpus[cx], sstep_flags); > > +cpu_resume(scpus[cx]); > > +} > > +for (cx = 0; ccpus && ccpus[cx]; cx++) { > > +

Re: [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-11 Thread Paolo Bonzini
On 10/10/2016 13:50, Claudio Imbrenda wrote: > +/* > + * XXX vm_start also calls qemu_vmstop_requested(); here, > is > + * it actually important? it's static in vl.c > + */ Yes, it is, :) and so is qapi_event_send_resume (which is automatically generated in

[Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour

2016-10-10 Thread Claudio Imbrenda
When GDB issues a "vCont", QEMU was not handling it correctly when multiple VCPUs are active. For vCont, for each thread (VCPU), it can be specified whether to single step, continue or stop that thread. The default is to stop a thread. However, when (for example) "vCont;s:2" is issued, all VCPUs