qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 0/2] Qemu: gdbstub: fix vCont


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v8 0/2] Qemu: gdbstub: fix vCont
Date: Tue, 14 Feb 2017 18:10:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Thanks, I hope to send a pull request this week, including this patch.

Paolo

On 14/02/2017 18:07, Claudio Imbrenda wrote:
> This small patchset fixes the incorrect behaviour of the vCont command
> in the gdb stub. 
> 
> The first patch, as suggested be Paolo, refactors some code. The most
> visible change is that it moves vm_start to cpus.c 
> 
> The second one fixes the incorrect behaviour of the vCont command.
> Previously, continuing or stepping a single thread (CPU) caused all
> other CPUs to be started too, whereas the GDB specification clearly
> states that without a default action all threads not explicitly
> mentioned in the command should stay stopped.
> 
> So if the Qemu gdbstub receives a  vCont;c:1  packet, no other CPU
> should be restarted except the first, and when a  vCont;s:1  is
> received, the first CPU should be stepped without restarting the others.
> With this patchset Qemu now behaves as expected.
> 
> See here for reference material about the packets: 
> https://sourceware.org/gdb/current/onlinedocs/gdb/Packets.html
> https://sourceware.org/gdb/onlinedocs/gdb/Packets.html
> 
> v7 -> v8
> * fixed and added some comments
> * fixed vCont a little bit for user mode
> * use cpu->cpu_index directly when possible
> 
> v6 -> v7
> * fixed description of patch 1 to reflect what is actually happening
>   and improved description of patch 2
> * removed leftover header declaration of resume_some_vcpus which had
>   been removed a few versions ago
> * fixed a compilation issue when compiling userspace-mode only
>   (global variable max_cpus is not defined when not in system-mode)
> 
> v4 -> v6
> * rebased on master after target-s390x was moved
> * put qemu_clock_enable back into resume_all_vcpus
> * improved the parsing function of the vCont packet
> * added qemu_clock_enable to gdb_continue_partial
> 
> v3 -> v4
> * rebased on v2.8.0-rc2, no changes needed
> 
> v2 -> v3
> * removed resume_some_vcpus
> * cleared up the code and simplified the implementation in light of the 
>   clarification in the specification of the vCont packet
> 
> Claudio Imbrenda (2):
>   move vm_start to cpus.c
>   gdbstub: Fix vCont behaviour
> 
>  cpus.c                  |  42 ++++++++++
>  gdbstub.c               | 209 
> +++++++++++++++++++++++++++++++++++++-----------
>  include/sysemu/sysemu.h |   2 +
>  vl.c                    |  30 +------
>  4 files changed, 207 insertions(+), 76 deletions(-)
> 



reply via email to

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