From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22321 invoked by alias); 6 May 2006 02:48:35 -0000 Received: (qmail 22312 invoked by uid 22791); 6 May 2006 02:48:35 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao03.cox.net (HELO eastrmmtao03.cox.net) (68.230.240.36) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 06 May 2006 02:48:33 +0000 Received: from localhost.localdomain ([68.9.66.48]) by eastrmmtao03.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060506024831.IXMA15797.eastrmmtao03.cox.net@localhost.localdomain> for ; Fri, 5 May 2006 22:48:31 -0400 Received: from bob by localhost.localdomain with local (Exim 4.52) id 1FcCqs-0008ON-J7 for gdb@sources.redhat.com; Fri, 05 May 2006 22:49:02 -0400 Date: Sat, 06 May 2006 02:48:00 -0000 From: Bob Rossi To: gdb@sources.redhat.com Subject: Re: asynchronous MI output commands Message-ID: <20060506024902.GD25114@brasko.net> Mail-Followup-To: gdb@sources.redhat.com References: <20060506012706.GA25114@brasko.net> <20060506015903.GA13095@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060506015903.GA13095@nevyn.them.org> User-Agent: Mutt/1.5.9i 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/msg00042.txt.bz2 On Fri, May 05, 2006 at 09:59:03PM -0400, Daniel Jacobowitz wrote: > On Fri, May 05, 2006 at 09:27:06PM -0400, Bob Rossi wrote: > > The first problem that I've run into is determining if an MI output > > command is synchronous or asynchronous. I can tell if the MI output > > command is asynchronous by looking for, reason="abc", like below, > > 47*stopped,reason="end-stepping-range",thread-id="0", ... > > `ASYNC-RECORD ==>' > `EXEC-ASYNC-OUTPUT | STATUS-ASYNC-OUTPUT | NOTIFY-ASYNC-OUTPUT' > > `EXEC-ASYNC-OUTPUT ==>' > `[ TOKEN ] "*" ASYNC-OUTPUT' > > `STATUS-ASYNC-OUTPUT ==>' > `[ TOKEN ] "+" ASYNC-OUTPUT' > > `NOTIFY-ASYNC-OUTPUT ==>' > `[ TOKEN ] "=" ASYNC-OUTPUT' > > Why can't you tell that output is asynchronous from the *stopped, as > opposed to ^done? OK, I could do this, and if that's the prefered way, then I will. The only strange thing about it, is either I need to hack up the parser to set a flag when it reaches that point, or I need to walk the parse tree semi-deep to get that info. Do you still think that would be the prefered way? Actually, I could just see if I ever get to the async-record to determine if the command is asynchronous, right? I just happened to notice that -exec-next and -interpreter-exec console next are surprisingly different. (gdb) -exec-next ^running (gdb) *stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x0804836b",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbf80e254"}],file="main.c",line="5"} (gdb) -interpreter-exec console next ~"6\t return 0;\n" ^done (gdb) Is next asynchronuos in 1 case and not the other? Bob Rossi