From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84190 invoked by alias); 25 Oct 2019 09:58:15 -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 84182 invoked by uid 89); 25 Oct 2019 09:58:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=tab, terminal, H*c:alternative X-HELO: mail-qt1-f174.google.com Received: from mail-qt1-f174.google.com (HELO mail-qt1-f174.google.com) (209.85.160.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Oct 2019 09:58:13 +0000 Received: by mail-qt1-f174.google.com with SMTP id o49so2348252qta.7 for ; Fri, 25 Oct 2019 02:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasko-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dfFWELDriYhWAavWaTIxBWF9jQuGD+nTFZjRjW6jEak=; b=MJi61T4o+NbfGu5SxTh+RIsrD+RC4OtiRyl0UWQV1BwEkmRV1spjnSSvpJKrGRsd3U UHVTs0Zvr5PUkbCtlzo/bCJ/wO7gogqk88XuDJjP+fk1Z5q2sMkWbletebM8dgGpU6SG Asf7ipZDenTWM9gmrtJyjSHG//RgqIEpWIY6OsqPQ2bjZvHMM59c5MLvU+hl/VLi5RiV EgRGfFZPVHmXP/G/1C2T86a+fSes7pEcjo1x8HknoOfH+7D9I3O/Zugo0v0HG1gtE9rW jpJ7sWPJxEt4/OaZ8lWaw0zHNSsGgpaZWN+1pOEeCI1532xzP/V0SXHxyt5YTSE/T2YT XARw== MIME-Version: 1.0 References: In-Reply-To: From: Robert Rossi Date: Fri, 25 Oct 2019 09:58:00 -0000 Message-ID: Subject: Re: gdb/mi, new-ui. the console and determining when GDB is ready for the next command To: GDB Development Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00041.txt.bz2 Ping On Tue, Oct 22, 2019 at 7:15 PM Robert Rossi wrote: > Hi, > > The question I have is, how are people determining when GDB is ready for > the next > command when using the new-ui feature of GDB? > Are people parsing the CLI window for (gdb)? > Am I missing something obvious? > > CGDB has historically used annotations to communicate with gdb. > This provided pre-prompt and post-prompt annotations to determine when the > GDB prompt > was available and ready for the next command. > > A couple of years ago I decided to try to port CGDB from annotations to MI. > At the time I asked the GDB mailing list how to determine when GDB was > ready for the next > command, Pedro Alves wrote: > GDB is ready for input when it prints the MI prompt. There's one > prompt that is > already printed after ^running that you should ignore. That's an > historical wart. > I got CGDB working but never completed the activity when I realized that > using -i=mi > caused GDB to no longer treat the terminal as an interactive terminal. > Meaning, GDB wouldn't do tab completion and/or ask the user if they were > ready to quit. > > Now I'm considering trying this again using the GDB new-ui feature. > In this mode the CLI remains in the starting terminal and the MI is moved > to the new-ui tty. > I noticed that in the new-ui window, the MI end token (gdb)\n isn't put > out. Is this intentional? > In this mode, what's the proper way to determine if GDB is ready for > another command? > > Thanks, > Bob Rossi >