From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26265 invoked by alias); 25 Jun 2004 15:12:31 -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 26256 invoked from network); 25 Jun 2004 15:12:30 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 25 Jun 2004 15:12:30 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i5PFCUe3022700 for ; Fri, 25 Jun 2004 11:12:30 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i5PFCT002818; Fri, 25 Jun 2004 11:12:29 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 633C62B9D; Fri, 25 Jun 2004 11:12:21 -0400 (EDT) Message-ID: <40DC40D5.4030007@gnu.org> Date: Fri, 25 Jun 2004 15:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Nick Roberts Cc: gdb@sources.redhat.com Subject: Re: How does GDB/MI give the current frame References: <16603.23348.569889.284030@nick.uklinux.net> In-Reply-To: <16603.23348.569889.284030@nick.uklinux.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00252.txt.bz2 > Changing the frame with a CLI command (up, down, frame) using annotations > (level 1 or 2), GDB returns an annotation giving the new current frame. > In contrast, the MI command is -stack-select-frame is silent. > > Assuming that future front ends shouldn't use CLI commands, how do you > get the current frame using MI only? > > Nick > > > Context: gdb-ui.el can have a window showing the call stack from which a stack > frame can be made current by selection with the mouse. The displayed source > updates automatically. I don't see how I can do this with gdb-mi.el without > using the CLI When the user does "up", "down", the debugger should generate a selected CLI frame changed event (it currently doesn't). If the GUI so chooses, it can track the users "selected" frame, by responding to these events. -stack-select-frame, assuming that it changes the CLI's selected frame, should generate that same event. Since the event is identical, the GUI can use common event driven code to track both the CLI selected, and GUI selected, frames. One additional note, look at ``Navigating [a]Way'': http://sources.redhat.com/gdb/papers/multi-arch/real-multi-arch/index.html#SEC25 It should be possible for the GUI to extract frame information from the inferior without altering the selected-frame (or selected-thread). I suspect that that currently isn't possible, I also suspect that right now you don't need it :-) Andrew