From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49592 invoked by alias); 23 May 2019 16:03:36 -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 49583 invoked by uid 89); 23 May 2019 16:03:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1026, H*f:sk:a724ea8, H*i:sk:a724ea8 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 May 2019 16:03:35 +0000 Received: from [172.16.0.120] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 4A0371E481; Thu, 23 May 2019 12:03:33 -0400 (EDT) Subject: Re: GDB/MI executing a python command To: Jan Vrany , David Griffiths , GDB References: <6dd959f2-09cf-2bb2-45cd-0f945ae5409d@simark.ca> From: Simon Marchi Message-ID: <7e9d7546-2f5a-82fa-3f65-a58c907cfc23@simark.ca> Date: Thu, 23 May 2019 16:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-05/txt/msg00043.txt.bz2 On 2019-05-23 11:54 a.m., Jan Vrany wrote: > I dont think so. In my opinion it *should* produce correct MI output. If there's an MI channel > opened, whenever the inferior is run or stopped, there should be an MI event, no matter what. > > Imagine you have an MI frontend and you execute, from CLI, a custom python command than in turn > does gdb.execute("stepi") - or worse, gdb.execute("cont"). Then inferior is running but MI frontend > still thinks it is stopped, making those two out of sync. This would lead in all sort of problems > like frontent would still show "stopped", when switching thread in UI would result an MI error when > trying to obtain stacktrace (which hard to handle, since all you get is a *localized* error message). > And so on. Yes, but that's what the *running notification is for. I was talking about the ^running, which is not a notification, but a reply to a command. It is strange that the MI channel gets a reply for a command it did not send. Simon