From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9103 invoked by alias); 23 May 2014 01:26:08 -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 9088 invoked by uid 89); 23 May 2014 01:26:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pb0-f53.google.com Received: from mail-pb0-f53.google.com (HELO mail-pb0-f53.google.com) (209.85.160.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 23 May 2014 01:26:06 +0000 Received: by mail-pb0-f53.google.com with SMTP id md12so3315007pbc.12 for ; Thu, 22 May 2014 18:26:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=G6wRQ3OFjs8g0CSCSixvE3KdBBfmsmPZ3FpqmoV83ME=; b=IPbsJYsFFb01fsTXAwrOouJAolr4o/zalExOaLKbc50GwK9pwryhNlLPQE+vUeaxai DLWQ5/OXBmDD4iuhYIgSoYNPfCJAd7T4jsjRE7Wc0k1+RP6AqePmxZmgLAShjK9TT6eq 1czSrSulwxMA+w5DP+p4EcXSlIldm5jqiZlAUsrYD+9pko4rZmYtKMGv2bPxDFl2eDV4 nonf9PIfEH2q53b29xNw414PuFuEWO5SdLghkrDGofWKNMsX/aEecCY8I+fZzhpcay4u G7O4u0fbdsbGz6/Vln3i3AXPDFu5XZxk+EIcAfS4NXYJqBgY++gSpdUzFSbja32kKyjT azPw== X-Gm-Message-State: ALoCoQnYPSS3+CMMdpFO7RXEeAI06Q75wU7hcSPwOnjgDZdpXeYAh5V7Bw56X1C9c5fy7GOd3zjc X-Received: by 10.66.240.197 with SMTP id wc5mr1715121pac.78.1400808364431; Thu, 22 May 2014 18:26:04 -0700 (PDT) Received: from linux (ip68-9-64-242.ri.ri.cox.net. [68.9.64.242]) by mx.google.com with ESMTPSA id ix7sm1674447pbd.36.2014.05.22.18.26.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 22 May 2014 18:26:03 -0700 (PDT) Date: Fri, 23 May 2014 01:26:00 -0000 From: Bob Rossi To: gdb@sourceware.org Subject: GDB/MI output command documentation error Message-ID: <20140523012631.GB10166@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00048.txt.bz2 Hi, The documentation for a GDB/MI output command says, output ==> ( out-of-band-record )* [ result-record ] "(gdb)" nl Where an out-of-band-record is one or more lines starting with * + = (for async records) ~ @ & (for stream records) A result record starts with a ^ (if no token is used). The result record is after the possible out-of-band-records. This Documentation is incorrect for the most basic GDB/MI command. When I provide the GDB/MI command, -exec-run I get the following output. =library-unloaded,... =library-unloaded,... =thread-group-started,... =thread-created,... ^running <- Incorrect location or docs are wrong *running,... (gdb) In mi-interp.c:mi_on_resume the code says: /* To cater for older frontends, emit ^running, but do it only once per each command. We do it here, since at this point we know that the target was successfully resumed, and in non-async mode, we won't return back to MI interpreter code until the target is done running, so delaying the output of "^running" until then will make it impossible for frontend to know what's going on. In future (MI3), we'll be outputting "^done" here. */ if (!running_result_record_printed && mi_proceeded) { fprintf_unfiltered (raw_stdout, "%s^running\n", current_token ? current_token : ""); } So, I assume we aren't going to change what GDB outputs at this point. For that reason, I would argue the documentation is wrong. The correct grammar would be something like, output ==> ( out-of-band-record )* [ result-record ] ( out-of-band-record )* "(gdb)" nl Right? Thanks, Bob Rossi