From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83654 invoked by alias); 17 Jun 2019 13:23:29 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 83646 invoked by uid 89); 17 Jun 2019 13:23:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*f:sk:a4559f7, H*i:sk:a4559f7, H*c:alternative X-HELO: pb-smtp20.pobox.com Received: from pb-smtp20.pobox.com (HELO pb-smtp20.pobox.com) (173.228.157.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Jun 2019 13:23:27 +0000 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id B324671CFD for ; Mon, 17 Jun 2019 09:23:25 -0400 (EDT) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=sasl; bh=MW/jx2o9IDC8QtkiCPuSOrUu2tY=; b=RKykna a4TCw2PczZhAKCY1gBTd6J2jUuV5fvzjpUb+MFpcF9UnbyULiWDQ0Sq79VSFJpQ7 TtW3CTcf7P7mhIeOIilU5MQIzYGoDjsmDbShtlHNyeFv5dU23Fc30w3KVeo7Nfkc FFjYEflkZflPusd/aHxhTgj/XfMCU9KXRD5o4= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id AAEC271CFC for ; Mon, 17 Jun 2019 09:23:25 -0400 (EDT) (envelope-from jonah@kichwacoders.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kichwacoders.com; h=mime-version:references:in-reply-to:from:date:message-id:subject:to:cc:content-type; s=mesmtp; bh=K4NIc5cq5ZX0H2TRA+CHs2vx071DGgCgd+Y7azT380M=; b=J8SOt8bDMdk7yBSAAj8JSiub+r0LYMyI9wMvQvQjAdAo2SC4EECwfW/MjXguaO6Xxj+usbBtCSeJpfOlDtgCQjbSWR/HEeQwFEY+xrZx9yfET6vaDZ/H0MaNg4MklOp2agAUqVjNR9phsTNXiA9BW/dP5raNyAATu/NT8bkedCk= Received: from mail-qt1-f182.google.com (unknown [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 4578671CFB for ; Mon, 17 Jun 2019 09:23:22 -0400 (EDT) (envelope-from jonah@kichwacoders.com) Received: by mail-qt1-f182.google.com with SMTP id y57so10646145qtk.4 for ; Mon, 17 Jun 2019 06:23:22 -0700 (PDT) MIME-Version: 1.0 References: <70fdd9107d9bb3cee0a1a342aedc05bf3c8e9bae.camel@fit.cvut.cz> <871rzu9at0.fsf@tromey.com> <20190617121412.GA4157@adacore.com> <20190617125638.GA6859@adacore.com> In-Reply-To: From: Jonah Graham Date: Mon, 17 Jun 2019 13:23:00 -0000 Message-ID: Subject: Re: MI3 and async notifications To: Jan Vrany Cc: Joel Brobecker , Tom Tromey , "gdb@sourceware.org" X-Pobox-Relay-ID: 144C5476-9103-11E9-B894-B0405B776F7B-18936988!pb-smtp20.pobox.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00042.txt.bz2 On Mon, 17 Jun 2019 at 09:12, Jan Vrany wrote: > On Mon, 2019-06-17 at 08:56 -0400, Joel Brobecker wrote: > > > I do agree, avoid the extra configurability - but I simply don't know > how > > > to work with just async notifications to sync messages. It means that > CDT > > > will have to issues the -break-insert, look for the done message and > > > "search" between them to find the =breakpoint-created that matched and > > > separately process any that don't. Please see my earlier message about > how > > > to handle race condition between -break-inserts over MI and breaks > inserted > > > from CLI. This race condition does not happen during normal operation > > > (where a human is driving everything) but does kick in during many > > > semi-automated flows. Perhaps this isn't a big problem, but to me it > seems > > > the logic to match up -break-insert to =breakpoint-created in client > side > > > is complex and bug prone. > > > > The part I don't understand is why it matters to sync the two. > > > Jonah, I was about to ask the same. I understand that you need to know > which breakpoint has been inserted by given command, but this > if we respond with something like > > 1-break-insert main > =breakpoint-created,bkpt={number="1",type=...} > 1^done,bkpt-number=1 > > then you just search for breakpoint with that id, no? Given that MI > guarantees that =breakpoint-created arrives before ^done reply to command. > Am I missing something? > No you aren't missing anything. That would be a perfectly acceptable solution for CDT. There would still be some other new logic needed for CDT, we would still have to store all the =breakpoint-created if there is a -break-insert active and then process all of them when the ^done is received. However that seems fairly reasonable. > > Also note that this is not only about breakpoints but also about things > like > -gdb-set and few others. > ?? This is down to me not following closely enough. If you can point me in the right direction then I can provide feedback now. If not it will have to wait until if/when CDT needs to update to MI3 support. However there are no gdb-sets that are likely to have any such issues as there is little to no UI elements connected to gdb-sets. CDT does all of its gdb-sets at startup to set the environment and then does not normally change any of them. Thanks, Jonah