Received: from eggs.gnu.org ([2001:4830:134:3::10]:37041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c086K-0001kd-IY for qemu-devel@nongnu.org; Fri, 28 Oct 2016 10:25:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c086H-0006u8-9u for qemu-devel@nongnu.org; Fri, 28 Oct 2016 10:25:44 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51270 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c086H-0006u0-4g for qemu-devel@nongnu.org; Fri, 28 Oct 2016 10:25:41 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9SEPN1U142495 for ; Fri, 28 Oct 2016 10:25:40 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 26c2rg3b4a-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 28 Oct 2016 10:25:40 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Oct 2016 15:25:38 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5D4FC17D8056 for ; Fri, 28 Oct 2016 15:27:51 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9SEPZKU36241578 for ; Fri, 28 Oct 2016 14:25:35 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9SEPZ0Y023998 for ; Fri, 28 Oct 2016 08:25:35 -0600 References: <1476445983-16661-1-git-send-email-imbrenda@linux.vnet.ibm.com> <1476445983-16661-3-git-send-email-imbrenda@linux.vnet.ibm.com> <6ff5fd4e-d371-f204-371a-07edcb545e93@redhat.com> <91243842-10e9-666b-83e8-e271322371f7@linux.vnet.ibm.com> <77a33e01-6293-8112-7fe2-4790ca13f736@redhat.com> From: Claudio Imbrenda Date: Fri, 28 Oct 2016 16:25:35 +0200 MIME-Version: 1.0 In-Reply-To: <77a33e01-6293-8112-7fe2-4790ca13f736@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Message-Id: Subject: Re: [Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pedro Alves , Christian Borntraeger , qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini On 28/10/16 16:01, Pedro Alves wrote: >> From the new specifications I seem to understand that if I specify a >> default as first action, then no further actions will be considered, >> since it matches all threads? > > Right. ok, that's the way I understand the new specs, which is not how I had understood the old specs (hence my questions), so I think your documentation patch was really needed. > Note that GDB never ever sent a vCont like that. It's always put > the default action last. So in practice, it doesn't change > any behavior. OTOH, stubs can be simpler, given there's no need to > special-case the default action. ok, I admit I never looked deeply into what GDB sends :) > (Also, with this definition we can safely break a big vCont packet > in multiple smaller ones, in non-stop mode: > > vCont;s:1;c == vCont;s:1 + vCont;c > vCont;c;s:1 == vCont;c + vCont;s:1 > vCont;s:1;s:2;s:3;s:3;s:4;...s:N;c == vCont;s:1;s:2;s:3 + vCont;s:4;...s:N;c that makes sense, although I never looked into it since Qemu doesn't support non-stop mode >> Or does the default only match any thread without an explicit match? >> (which is how I interpreted the old spec) > > Maybe I should just remove all mentions of a "default" from the text? [..] > Like: > > diff --git c/gdb/doc/gdb.texinfo w/gdb/doc/gdb.texinfo > index d636a16..df548dc 100644 > --- c/gdb/doc/gdb.texinfo > +++ w/gdb/doc/gdb.texinfo > @@ -35538,9 +35538,8 @@ syntax described in @ref{thread-id syntax}. If multiprocess > extensions (@pxref{multiprocess extensions}) are supported, actions > can be specified to match all threads in a process by using the > @samp{p@var{pid}.-1} form of the @var{thread-id}. An action with no > -@var{thread-id} is called the default action and matches all threads. > -Specifying multiple default actions is an error; specifying no actions > -is also an error. > +@var{thread-id} matches all threads. Specifying no actions is an > +error. > Would that help ? that makes it even more clear (and simple). On the other hand, now expressing more than one default is not considered an error any longer (although the extra defaults serve no purpose); in the end it wouldn't break backwards compatibility, so why not. Basically a "default" e.g. "s" is the same as specifying "s:-1". This does make the implementation of the stub easier. thanks a lot for your prompt and detailed reply!