From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2596 invoked by alias); 13 Nov 2012 22:23:59 -0000 Received: (qmail 2587 invoked by uid 22791); 13 Nov 2012 22:23:57 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Nov 2012 22:23:52 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TYOtb-00030x-Mh from Luis_Gustavo@mentor.com ; Tue, 13 Nov 2012 14:23:51 -0800 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 13 Nov 2012 14:23:51 -0800 Received: from [0.0.0.0] ([172.16.63.104]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 13 Nov 2012 14:23:50 -0800 Message-ID: <50A2C88B.6070105@codesourcery.com> Date: Tue, 13 Nov 2012 22:23:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Lightning/1.0b2 Thunderbird/3.1.20 MIME-Version: 1.0 To: Tom Tromey CC: Pedro Alves , ali_anwar , dje@google.com, Yao Qi , gdb-patches@sourceware.org, Vladimir Prus Subject: Re: Patch to propagate GDB's knowledge of the executing state to frontend References: <50891E05.7050509@codesourcery.com> <508F719C.2080409@codesourcery.com> <20627.61842.606081.697743@ruffy2.mtv.corp.google.com> <50941519.6010005@codesourcery.com> <509D5E19.5060409@redhat.com> <509D8B21.2040804@codesourcery.com> <87wqxp414y.fsf@fleche.redhat.com> In-Reply-To: <87wqxp414y.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00352.txt.bz2 On 11/13/2012 07:57 PM, Tom Tromey wrote: > Luis> Should frontends relying on MI information treat ^error specially and > Luis> not look for any *stopped records? > > I don't know the answer to this. I did find this though: > > http://sourceware.org/bugzilla/show_bug.cgi?id=7778 > > I tend to think it would be cleanest if gdb were to emit a *stopped in > case of error -- but only if it previously emitted *running. I don't > know how feasible this is. Right. That seems to be what Ali's patch is attempting to address, in order to improve the relationship with the frontends. > > Luis> The MI specification gives room for slightly different interpretations > Luis> unfortunately. > > For me, the text for "*running" is pretty clear: > > The frontend should assume that no interaction with a > running thread is possible after this notification is produced. > > I'm curious where the text is that gives room for another approach. I wanted to know what is to be done once an ^error is thrown at the frontend and how it should behave. There is this text: "There's no guarantee that whenever an MI command reports an error, gdb or the target are in any specific state, and especially, the state is not reverted to the state before the MI command was processed. Therefore, whenever an MI command results in an error, we recommend that the frontend refreshes all the information shown in the user interface." It is not clear how things need to be refreshed, specially when the frontend needs to assume a thread/inferior is still running after it saw ^running but did not see a *stopped record, though it did see an ^error. But ^error does not imply the target has stopped. So it needs to refresh information, but should it forget the target was running and attempt to fetch data anyway or should it do something else? In the case of all-stop mode, we know the inferior is stopped. This may not be true for non-stop though. Luis