From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22944 invoked by alias); 4 Jan 2007 20:49:47 -0000 Received: (qmail 22934 invoked by uid 22791); 4 Jan 2007 20:49:46 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 04 Jan 2007 20:49:40 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-54.snap.net.nz [202.124.120.54]) by viper.snap.net.nz (Postfix) with ESMTP id 3F6C53D8288; Fri, 5 Jan 2007 09:49:32 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id BA03E4F6D0; Fri, 5 Jan 2007 09:49:29 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17821.26712.100127.455097@kahikatea.snap.net.nz> Date: Thu, 04 Jan 2007 20:49:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] MI: Event notification In-Reply-To: References: <17817.40495.289353.14514@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.0.92.5 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00139.txt.bz2 > > The general idea is to report changes in program state to the frontend so > > that it only updates the parts that need it. For example, after "up" > > frame_changed_hook triggers and the frontend knows it has to update the > > locals display. > > You mean, after "up" emitted explicitly by the user? If the frontend changes > the frame itself, it does not need any notifications. It might not be by clicking on a button but by typing "up" or even "u" from the console (GUD buffer). In such a case how would the frontend know that the frame has changed? > > This means that stepping through a single frame should be much > > quicker. If GDB enters a new frame during execution, stack_changed_hook > > triggers and the frontend knows it has to update the call stack display. > > I would eventually like to add more hooks like target-changed-hook when > > the user attaches to/detaches from a process, kills the process, or > > selects a new target with the "file" command. > > Is this all for user-typed commands? I wonder if notifications for those are > really needed. Reloading entire UI state after a user command does not seem > too bad -- because user is not likely to enter 10 commands per second anyway > -- and is much simpler. With a large stack and stepping through the program, I think it is very noticeable, which is why I frequently try to select a line to run to. > > The hooks are inserted/removed through "interpreter-exec console > > cli-command" > > Sorry, can you clarify? In mi_cmd_interpreter_exec, there are calls to mi_insert_notify_hooks and mi_remove_notify_hooks. > > so I envisage not using MI commands like -exec-run, > > -exec-next, -stack-select-frame that change that state. mi_cmd_interpreter_exec only gets called with "interpreter-exec" so there would be no event notification in this case. -- Nick http://www.inet.net.nz/~nickrob