From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20303 invoked by alias); 7 Feb 2003 20:20:49 -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 20295 invoked from network); 7 Feb 2003 20:20:48 -0000 Received: from unknown (HELO nick.uklinux.net) (194.247.51.54) by 172.16.49.205 with SMTP; 7 Feb 2003 20:20:48 -0000 Received: by nick.uklinux.net (Postfix, from userid 501) id 646BA76037; Fri, 7 Feb 2003 20:17:34 +0000 (GMT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15940.5214.123419.414411@nick.uklinux.net> Date: Fri, 07 Feb 2003 20:20:00 -0000 To: gdb@sources.redhat.com Subject: GDB/MI revisited X-SW-Source: 2003-02/txt/msg00156.txt.bz2 Andrew Cagney writes: > Can you post a transcript of a typical EMACS <-> GDB session? It would depend on the user, of course, but typically GDB commands would be passed to gdb by two means: explicitly through the GUD buffer or through a lisp function. The latter could be invoked through the minibuffer, a key sequence or through the toolbar. I'm exploring two approaches: 1) Running gdb normally and accessing GDB/MI using "interpreter mi mi-command". 2) Running gdb with GDB/MI (-interp=mi) and accessing CLI using "-interpreter-exec console cli-command". In both cases, the source file display is only updated if commands are issued through a lisp function. This is because in the first case the lisp function is bound to an mi command indirectly e.g (gud-def gud-run "interpreter mi -exec-run" nil "Run the program.") and in the second case it is bound to one directly e.g (gud-def gud-run "-exec-run" nil "Run the program.") and these output the out of bound record `*stopped' which emacs can parse for the program location. Conversely, in both cases, GDB commands entered through the GUD buffer do not currently generate `*stopped' and source display is not updated. QUESTION: Is it possible to modify GDB so that it does generate `*stopped' in these cases? The first case would require that a cli command generates out of bound records. This would require a change in behaviour in gdb so need its own flag e.g gdb -emacs The second case would require that "-interpreter-exec console cli-command" generates out of bound records. This could be its defined behaviour as it probably would be appropriate to others. Nick