From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29387 invoked by alias); 22 Oct 2019 23:15:40 -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 29261 invoked by uid 89); 22 Oct 2019 23:15:26 -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, rossi, Alves, alves X-HELO: mail-io1-f54.google.com Received: from mail-io1-f54.google.com (HELO mail-io1-f54.google.com) (209.85.166.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Oct 2019 23:15:25 +0000 Received: by mail-io1-f54.google.com with SMTP id t18so18454821iog.2 for ; Tue, 22 Oct 2019 16:15:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasko-net.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=VekGEDSurXmzIEPxqENHFlFLgauaGeyqFIWrNJG3GRA=; b=D53SAFweRxNn3Kk5tbe4rDuCgYGht3ZvV/HPbPwuqZKK+yT1gjbjzIykX8xOsJtKS1 cOS0FPAl+w2MCGGPWVuc97XzJ+vEpFjXzRh45kbztwZR0/26yetVQFYHG2DX5i/FPdX5 0kGlG2JYsj38CFW+gSqkbjMMYhVLrnZY8N2JoTu7CwgJaRT5QI7EAqeGY6l4K4fAXZwx IBLB6H2TAKaB898pRs0VNgwhedCW8z2hYAU1qjFzBk79oKgK8RA8TcFbbhS6RmdvXPUh RtplmVdshbPrCxTS2U3EA9D2UuFxIpFGU08jeLYMPe+FZ99pU/+kPj/GUCMa5pZhGbrk EHtQ== MIME-Version: 1.0 From: Robert Rossi Date: Tue, 22 Oct 2019 23:15:00 -0000 Message-ID: Subject: 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/msg00035.txt.bz2 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