From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19595 invoked by alias); 6 May 2006 20:37:45 -0000 Received: (qmail 19587 invoked by uid 22791); 6 May 2006 20:37:45 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 06 May 2006 20:37:43 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FcTX3-0007fW-8q for gdb@sourceware.org; Sat, 06 May 2006 16:37:41 -0400 Date: Sun, 07 May 2006 20:35:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: asynchronous MI output commands Message-ID: <20060506203741.GA29439@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org References: <20060506012706.GA25114@brasko.net> <20060506015903.GA13095@nevyn.them.org> <20060506031435.GE25114@brasko.net> <17500.8198.679332.240864@farnswood.snap.net.nz> <20060506040637.GA14894@nevyn.them.org> <20060506114933.GF25114@brasko.net> <20060506152046.GA24267@nevyn.them.org> <20060506164030.GK25114@brasko.net> <20060506165249.GA25972@nevyn.them.org> <20060506194618.GL25114@brasko.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060506194618.GL25114@brasko.net> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00060.txt.bz2 On Sat, May 06, 2006 at 03:46:18PM -0400, Bob Rossi wrote: > OK, we are going in circles. I currently have a goal of determining if a > MI output is synchronous or asynchronous. So you keep saying - but I'm not sure that you're asking the right question. > > I still don't understand the question - the point of categorizing > > messages in this way. > > I was hoping to tell the front end if the command was asynchronous or > not. There is a use in knowing if the command is asynchronous or not. > First of, if the command is asynchronous then I don't have to probe the > parse tree to determine if it represents the results to say, > -file-list-exec-source-file or some other commands. I know when building > the ADT for the FE that it's an asynchronous command, and that limits > the amount of probing in the parse tree I have to do. That's not the difference between synchronous and asynchronous, in MI: think of it instead as the difference between synchronous and everything else. A synchronous response from MI corresponds to a front-end command. Everything else corresponds to other state changes, which may be related to some command or not, in a less than obvious way. You can easily categorize a ^done or ^error response as synchronous. Other responses are more difficult to associate with a command, because they weren't directly issued as the response to a command. > It could output > > -file-list-exec-source-file > %-file-list-exec-source-file > ^done,line="26",file="test.c",fullname="/home/bob/cvs/cgdb/cgdb.mi/builddir/test.c" > (gdb) Accomplishing what? This is synchronous. It's a response to the previously issued command. The front end knows exactly what its previously issued command was, I hope. -- Daniel Jacobowitz CodeSourcery