From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5255 invoked by alias); 16 Jul 2004 14:04:14 -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 5239 invoked from network); 16 Jul 2004 14:04:13 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sourceware.org with SMTP; 16 Jul 2004 14:04:13 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id JAA02421 for ; Fri, 16 Jul 2004 09:23:08 -0400 Received: (from alain@localhost) by smtp.ott.qnx.com (8.8.8/8.6.12) with UUCP id KAA24738 for gdb@sources.redhat.com; Fri, 16 Jul 2004 10:04:10 -0400 Message-Id: <200407161404.KAA24738@smtp.ott.qnx.com> Subject: Re: How does GDB/MI give the current frame To: jmolenda@apple.com (Jason Molenda) Date: Fri, 16 Jul 2004 14:08:00 -0000 From: "Alain Magloire" Cc: cagney@gnu.org (Andrew Cagney), alain@qnx.com (Alain Magloire), gdb@sources.redhat.com, nickrob@gnu.org (Nick Roberts) In-Reply-To: <28ADB7D6-D69A-11D8-BBF3-000A9569836A@apple.com> from "Jason Molenda" at Jul 15, 2004 01:04:20 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00202.txt.bz2 > > > On Jul 15, 2004, at 12:45 PM, Nick Roberts wrote: > > >> 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 > > > For what it's worth, at Apple we've done what Andrew is proposing. Our > method spits out a "MI_HOOK_RESULT" notification on the ^done result > whenever the console command entered by the user has changed the state > in an important way. e.g. > > (gdb) > -interpreter-exec console-quoted up > ~"#2 0x000321f4 in gdb_main (args=0xbffff620) at > ../../gdb/src/gdb/main.c:851\n" > ~"851\t catch_errors (captured_main, args, \"\", RETURN_MASK_ALL);\n" > ^done,MI_HOOK_RESULT=[HOOK_TYPE="frame_changed",frame="2"],time= > {wallclock="0.00620",user="0.00323",system="0.00283",start="1089921236.3 > 59009",end="1089921236.365212"} > (gdb) > But what Andrew is proposing is to use the async-output already part of MI to notify the UI of changes. What you are showing here is this new MI_HOOK_RESULT, unless the output is missing lines ? > > > FWIW, here's the list of notification hooks we currently generate: > breakpoint_create, breakpoint_modify, breakpoint_delete, stack_changed, > frame_changed, thread_changed. > Cool !