From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30470 invoked by alias); 25 Mar 2008 17:46:27 -0000 Received: (qmail 30457 invoked by uid 22791); 25 Mar 2008 17:46:26 -0000 X-Spam-Check-By: sourceware.org Received: from mail.windriver.com (HELO mail.wrs.com) (147.11.1.11) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Mar 2008 17:46:04 +0000 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id m2PHk2pC013239 for ; Tue, 25 Mar 2008 10:46:03 -0700 (PDT) Received: from ala-mail06.corp.ad.wrs.com ([147.11.57.147]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 25 Mar 2008 10:46:02 -0700 Received: from [147.11.233.101] ([147.11.233.101]) by ala-mail06.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 25 Mar 2008 10:46:02 -0700 Message-ID: <47E93A59.7020400@windriver.com> Date: Tue, 25 Mar 2008 18:30:00 -0000 From: Pawel Piech User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Re: MI non-stop mode spec References: <200803190016.02072.vladimir@codesourcery.com> <47E3FA92.40409@windriver.com> <200803242016.19140.vladimir@codesourcery.com> <47E7F4D4.9050501@windriver.com> <47E81C22.4000508@windriver.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2008-03/txt/msg00221.txt.bz2 Vladimir Prus wrote: >> >> Thanks for agreeing :-) Like I said, I have no idea of the complexity >> of such a change. However, it seems to me that you should be able to >> implement a simple protcol-state-tracking logic for both CLI and MI >> protocols, and simply simulate the --thread option for commands that >> don't supply one. This way you could have both the backward compatible >> stateful protocol, and have the -thread option to override it on the >> individual commands. >> > > This might be actually a reasonable thing. On one thing, not switching > the current thread might be good for CLI. On the other hand, I still believe > that --thread is ultimately better solution for MI. Then, it might be best to > make GDB not to switch threads (benefiting CLI and stateful MI), and > also accept --thread for the benefit of newer MI clients. > > Now there's the catch that --thread is already implemented and is rather > straightforward, whereas I expect some corner cases in implementing thread > that does not change. I think we'll first get the non-stop mode working > with --thread, and then look into making current thread not change. > (For avoidance of doubt, "then" means "immediately after" not "someday"). > I think this would be an excellent compromise. If there is any kind of a layering between the protocol interpreter and the underlying functions, it shouldn't be too much of a stretch to add the state tracking in the protocol interpreter layer. BTW, for the clients that support both a UI and a command console it would be even even better if CLI and MI maintained their own current thread and stack frame. This would prevent the two interfaces from interfering with each other. Cheers, Pawel