From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41151 invoked by alias); 19 Jan 2017 14:52:10 -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 41116 invoked by uid 89); 19 Jan 2017 14:52:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=H*p:D*net, Marc, H*r:sk:gdb@sou, 58pm X-HELO: mail-pf0-f179.google.com Received: from mail-pf0-f179.google.com (HELO mail-pf0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jan 2017 14:51:57 +0000 Received: by mail-pf0-f179.google.com with SMTP id f144so14129246pfa.2 for ; Thu, 19 Jan 2017 06:51:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VbxKzVmYUVkIUodXFY9zg/VcQdKavx5j4KJAjEuYHQk=; b=odHOTHaMmfn8Xiq9p+cZaYXLtkDO9C6RD0JQhloZ9f7EABbyJ4IdZJkVkxpgNp5kzd O1VhwiyYhh8S2T+5FPu57vr8SCB4e7Bcsv5zsRwKPphdWjTWk4+Ippc2x+mGrkElSP5F SSKXOVFNVWXxInIxNu0zSMkmG01Db/boeKDggZucAQ0vQutCN7RMmOPJizjevQf/X2Go jrGBgx4VwpoqAb/n/XVxhVpDY4stiiLcTjlugXbVTd8CkIlfRcj+vxoJ9CYsfSe6V6ae 0T/Nx3BJcrPSpy3ok2GZYxwOP0IzevPAIIyRcFi86YKT9M5Q88twJdjE9+XNnImEZr9T yHOA== X-Gm-Message-State: AIkVDXL7YN5Y7gUcWKr/uKBY00ZV6ds332tjRj4qbSW91Ca5VGTFq6tCtT+lWHSJwQRYbg== X-Received: by 10.99.102.69 with SMTP id a66mr10610263pgc.49.1484837515581; Thu, 19 Jan 2017 06:51:55 -0800 (PST) Received: from xubuntu.brasko.net (ip70-181-32-92.ri.ri.cox.net. [70.181.32.92]) by smtp.gmail.com with ESMTPSA id u78sm9543393pfa.53.2017.01.19.06.51.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 06:51:55 -0800 (PST) Date: Thu, 19 Jan 2017 14:52:00 -0000 From: Bob Rossi To: Marc Khouzam Cc: "gdb@sourceware.org" Subject: Re: GDB/MI questions Message-ID: <20170119145152.GA6289@xubuntu.brasko.net> References: <20170119031445.GA24616@xubuntu.brasko.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00031.txt.bz2 On Thu, Jan 19, 2017 at 02:30:58PM +0000, Marc Khouzam wrote: > > Hi, > > > > I'm attempting to convert CGDB (a GDB front end) from annotations to MI. > > Two questions I've run up against: > > > > The first is, with annotations, it's easy to tell when GDB can except > > another command, just wait for the prompt annotation. > > With GDB/MI it seems a little trickier. So far I have this: > > Wait for the gdb prompt > > If you have not recieved a *running yet, it's safe to run a command. > > Otherwise, if you have recieved a *running, you need to wait for > > the prompt and for *stopped. > > Anyone have a better approach? Does multi target impact this? > > In most cases, you don't need to care about this. You can normally > send other commands even when GDB is blocked and they will be > buffered until GDB unblocks. I understand that your opinion is to just send the commands and let them buffer. However, it avoids the question. Is there a technique to know if GDB is ready for input using MI? Thanks, Bob Rossi