From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30792 invoked by alias); 15 Jul 2004 19:49:19 -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 30785 invoked from network); 15 Jul 2004 19:49:18 -0000 Received: from unknown (HELO nick.uklinux.net) (194.247.50.215) by sourceware.org with SMTP; 15 Jul 2004 19:49:18 -0000 Received: by nick.uklinux.net (Postfix, from userid 501) id 7CE4F75FDE; Thu, 15 Jul 2004 20:45:16 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16630.57035.572672.532135@nick.uklinux.net> Date: Thu, 15 Jul 2004 19:50:00 -0000 To: Andrew Cagney Cc: Alain Magloire , gdb@sources.redhat.com Subject: Re: How does GDB/MI give the current frame In-Reply-To: <40F697E7.9060904@gnu.org> References: <40DE2D1B.4070003@gnu.org> <200406302047.QAA29956@smtp.ott.qnx.com> <16613.39781.921538.192414@nick.uklinux.net> <40EDC76F.2070809@gnu.org> <16625.46597.86962.340302@nick.uklinux.net> <40F2986D.4010205@gnu.org> <16626.56338.385281.264806@nick.uklinux.net> <40F697E7.9060904@gnu.org> X-SW-Source: 2004-07/txt/msg00183.txt.bz2 > That's almost the whole idea. The -interpreter-exec command provides > two mechanism to the GUI/client: > > - the ability to access GDB's `console' vis: > -> -interpreter cli "up" > <- ~"info on new frame..." > <- done > > - the ability to notify the GUI of console sideeffects vis: > <- *select-frame,... That sounds like a third interface. This is an elegant approach but assumes that someone will implement the notification for every CLI command that has side effects. This seems unlikely in the current circumstances > > In Emacs, I will run commands from the console with > > "-interpreter-exec console" and check the status of gdb with a set of MI > > commands run behind the users back. I imagine a lot of others will do the > > same, so please don't change this. > > Wouldn't these polling commands need to be run behind the users back > after every CLI command? By monitoring these events, the GUI can avoid > polling except when needed. Yes, so I guess it will be slower. It just seems a realistic starting point. It would only need a handful of MI commands to give the rough status of GDB: -var-update -break-list -stack-list-locals -stack-list-frames -stack-info-frame (not implemented yet) The MI output on the "-interpreter-exec console" command could be added later if wished. I think it would need to be done in a co-ordinated fashion not piecemeal, however. Nick