qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 0/2] Qemu: gdbstub: fix vCont and single-step
@ 2016-10-10 11:50 Claudio Imbrenda
  2016-10-10 11:50 ` [Qemu-devel] [PATCH v1 1/2] gdbstub: Fix single-step Claudio Imbrenda
  2016-10-10 11:50 ` [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour Claudio Imbrenda
  0 siblings, 2 replies; 15+ messages in thread
From: Claudio Imbrenda @ 2016-10-10 11:50 UTC (permalink / raw)
  To: qemu-devel

This small patchset fixes two bugs that affect the gdb stub.

The first one is 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/onlinedocs/gdb/Packets.html

The second bug causes single-step mode not to work any longer, it was
introduced with commit e0eeb4a21a3ca4b296220ce4449d8acef9de9049 . This
bug causes all s (single-step) commands to behave like c (continue)
commands.

Claudio Imbrenda (2):
  gdbstub: Fix single-step
  gdbstub: Fix vCont behaviour

 gdbstub.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++++-------------
 kvm-all.c |   1 +
 2 files changed, 151 insertions(+), 39 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-10-13  7:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10 11:50 [Qemu-devel] [PATCH v1 0/2] Qemu: gdbstub: fix vCont and single-step Claudio Imbrenda
2016-10-10 11:50 ` [Qemu-devel] [PATCH v1 1/2] gdbstub: Fix single-step Claudio Imbrenda
2016-10-10 12:51   ` Christian Borntraeger
2016-10-10 14:36     ` Paolo Bonzini
2016-10-10 15:46       ` [Qemu-devel] [PATCH] kvm-all: don't use stale dbg_data->cpu Alex Bennée
2016-10-10 16:39         ` Paolo Bonzini
2016-10-10 17:18           ` Christian Borntraeger
2016-10-11 11:48         ` Claudio Imbrenda
2016-10-10 11:50 ` [Qemu-devel] [PATCH v1 2/2] gdbstub: Fix vCont behaviour Claudio Imbrenda
2016-10-11  8:18   ` Paolo Bonzini
2016-10-12 13:15     ` David Hildenbrand
2016-10-12 13:55       ` Claudio Imbrenda
2016-10-12 16:48         ` Paolo Bonzini
2016-10-12 18:38         ` David Hildenbrand
2016-10-13  7:49           ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).