From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93290 invoked by alias); 29 Oct 2019 13:21:25 -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 93017 invoked by uid 89); 29 Oct 2019 13:21:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 spammy=Robert, H*Ad:U*palves, Pedro, pedro X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Oct 2019 13:21:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572355281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mMy1ogk8g5rBuC5P9UBZdEDdTK8HyXHpqtSIoIYlhdQ=; b=fIJxFS6Tszg+C7QN+T7NFyvgaL6Lc+ZwYhuyU/0wFuIAibrkPDb9HsK8T147F2DQgV2ZyC iPtQNg1FNi1dbdX7A47Kwd/gKgCGMfzdf+OJ8dK9o/5f2m2gA5P61SbHQeXPnhsH+YPg+F XKuMpeJth7jCzK4WvTrG2sx+4O1zJMk= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-132-358lkncrNey2rls4J0uJLw-1; Tue, 29 Oct 2019 09:21:19 -0400 Received: by mail-wr1-f69.google.com with SMTP id h4so8356896wrx.15 for ; Tue, 29 Oct 2019 06:21:19 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id q11sm2612060wmq.21.2019.10.29.06.21.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Oct 2019 06:21:17 -0700 (PDT) Subject: Re: gdb/mi, new-ui. the console and determining when GDB is ready for the next command To: Robert Rossi , GDB Development References: From: Pedro Alves Message-ID: <12814f17-0c65-e214-7e68-3214d3ed6ab6@redhat.com> Date: Tue, 29 Oct 2019 13:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-10/txt/msg00049.txt.bz2 On 10/23/19 12:15 AM, Robert Rossi wrote: > Hi, >=20 > 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? >=20 > 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. >=20 > A couple of years ago I decided to try to port CGDB from annotations to M= I. > 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=3Dmi > 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. >=20 > 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? I'm not sure what you mean -- I see the end token being put out? Thanks, Pedro Alves