From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23964 invoked by alias); 20 Mar 2015 05:40:47 -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 23952 invoked by uid 89); 20 Mar 2015 05:40:46 -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,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 20 Mar 2015 05:40:44 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YYpfk-00076F-At for gdb@sourceware.org; Fri, 20 Mar 2015 06:40:40 +0100 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Mar 2015 06:40:40 +0100 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Mar 2015 06:40:40 +0100 To: gdb@sourceware.org From: Vladimir Prus Subject: Re: Can gdbmi process many commands at once? Date: Fri, 20 Mar 2015 05:40:00 -0000 Message-ID: References: <20150320012207.GB25457@linux> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 In-Reply-To: <20150320012207.GB25457@linux> X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00071.txt.bz2 On 03/20/2015 04:22 AM, Bob Rossi wrote: > Hi, > > I'm trying to determine if GDB/MI has the capability of accepting and > working on multiple commands at once? > > For instance, if I run these commands, > (gdb) > 123-interpreter-exec console "p argc" > ~"$3 = 1" > ~"\n" > 123^done > (gdb) > 234-interpreter-exec console "p argv[1]" > ~"$4 = 0x0\n" > 234^done > > Is there any mode in which the command, > 234-interpreter-exec console "p argv[1]" > will be worked on before > 123-interpreter-exec console "p argc" > is finished? > > The implication is that i'm expecting to have at most 1 command active > with GDB at a time. I'm curious if there is a situation where a front > end could have many active commands at a time. By active I mean, > I issue several commands, and then some time later, I get a response > on each of these, in any order. Bob, it is not possible with the current GDB. All of the commands are executed in the single thread GDB has, in the order they were received. It is possible, in theory, that somebody will require GDB in node.js, or introduce asynchronous operation using boost.asio or similar, but that's quite unlikely scenario. -- Vladimir Prus CodeSourcery / Mentor Embedded http://vladimirprus.com