From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32547 invoked by alias); 24 May 2002 21:52:42 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32503 invoked from network); 24 May 2002 21:52:38 -0000 Received: from unknown (HELO e31.co.us.ibm.com) (32.97.110.129) by sources.redhat.com with SMTP; 24 May 2002 21:52:38 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.194.23]) by e31.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id g4OLqYWo045684 for ; Fri, 24 May 2002 17:52:34 -0400 Received: from d25ml05.torolab.ibm.com (d25ml05.torolab.ibm.com [9.26.6.106]) by westrelay02.boulder.ibm.com (8.11.1m3/NCO/VER6.1) with ESMTP id g4OLqYH128626 for ; Fri, 24 May 2002 15:52:34 -0600 Subject: Re: [MI] Synchronous event notification To: gdb@sources.redhat.com Message-ID: From: thomson@ca.ibm.com Date: Fri, 24 May 2002 14:52:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-SW-Source: 2002-05/txt/msg00273.txt.bz2 Keith Seitz wrote: >The example above shows that Apple has added a syntax like: > > result ==> > stuff [ "," event-list ] > event-list ==> > "MI_HOOK_RESULT=[" event ( "," event )* "]" > Keith, what I see is more like result ==> stuff ( "," event ) * event ==> "MI_HOOK_RESULT=[HOOK_TYPE=" event-name [ event-data ] "]" which you can verify, e.g. by running a user defined command that creates 2 breakpoints, you get two MI_HOOK_RESULTs. In Apple's (old) code these hooks are only enabled for the duration of an -interpreter-exec console command. That means there are several ways a UI is notified of breakpoint creation after -break-insert, you get ^done,bkpt=[number="1",type="breakpoint", ...] after -interpreter-exec console "break ...", or using -interpreter-exec to run a user defined command or script that creates breakpoints, you are proposing ^done,event=[name="breakpoint_create", ...] from a breakpoint command list (e.g. enable bkpt 2 after bkpt 1 is hit 100 times) ... hmm, when MI is enabled these commands don't run unless you also use --noasync, maybe bpstat_do_actions() is not called from the event loop? Anyway, when I do get them to run, there is no notification at all. As consumers, we would prefer to have one notification that is reliable and consistent. Are you also looking at the other, non-event hooks Apple introduced? query hook - always answers "y" to a "y or n" query (seems a little scary) read one line hook - If a console command needs multiline input (e.g."define", "document", "if", or "while), prompt with =read-one-line,prompt="prompt" so the UI can know not to prepend "-interpreter-exec console" to the next input line. resume hook - if a console command attempts to run the target, don't do it, instead send the notification =rerun back to the UI, I guess so it can get out of "CLI mode" first. Brian Thomson IBM