From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29820 invoked by alias); 5 Oct 2010 18:30:49 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 29802 invoked by uid 22791); 5 Oct 2010 18:30:48 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org From: Pedro Alves To: archer@sourceware.org Subject: Re: BUG: gdb && notification packets (Was: gdbstub initial code, v12) Date: Tue, 05 Oct 2010 18:30:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: Oleg Nesterov , utrace-devel@redhat.com References: <20100930182320.GA17475@redhat.com> <20101004181053.GA30217@redhat.com> <20101005172729.GA27882@redhat.com> In-Reply-To: <20101005172729.GA27882@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010051930.38721.pedro@codesourcery.com> X-SW-Source: 2010-q4/txt/msg00003.txt.bz2 On Tuesday 05 October 2010 18:27:29, Oleg Nesterov wrote: > The more or less "typical" transcript is: > > [... snip ...] > => s This is already wrong. "The stub must support @samp{vCont} if it reports support for multiprocess extensions (@pxref{multiprocess extensions})." The stub must also support vCont for non-stop, though I'll give you that it doesn't appear to be mentioned in the manual, and that gdb could be more noisy about this. Look at remote.c:remote_resume, and you'll see that gdb does not wait for the "OK" after 'c'/'s'/'S'/'C' in non-stop mode. You're getting "lucky", because when gdb processes the OK you're sending it, gdb is interpreting that as an 'O' stop reply, but since 'K' is an uneven number of characters, remote_console_output happens to just bail out silently. Now, given this, I won't be surprised if you're seeing races with ->s, <-OK, ->vCont sequences, as GDB may well be thinking that the "OK" is a reply to the vCont. > So, I strongly believe gdb is buggy and should be fixed. Fix your stub to implement vCont;s/c(/S/C). -- Pedro Alves