From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18569 invoked by alias); 10 Jun 2008 02:04:35 -0000 Received: (qmail 18547 invoked by uid 22791); 10 Jun 2008 02:04:30 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jun 2008 02:04:04 +0000 Received: from kahikatea.snap.net.nz (215.60.255.123.dynamic.snap.net.nz [123.255.60.215]) by viper.snap.net.nz (Postfix) with ESMTP id D73CB3DA1D5; Tue, 10 Jun 2008 14:04:01 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 441558FC6D; Tue, 10 Jun 2008 14:03:48 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18509.57602.879804.675918@kahikatea.snap.net.nz> Date: Tue, 10 Jun 2008 02:30:00 -0000 To: Pedro Alves Cc: gdb-patches@sourceware.org, ghost@cs.msu.su Subject: Re: [patch:MI] Observer for thread-changed In-Reply-To: <200806100104.28694.pedro@codesourcery.com> References: <18509.7945.19078.399646@kahikatea.snap.net.nz> <200806091428.29157.pedro@codesourcery.com> <18509.45981.233865.890248@kahikatea.snap.net.nz> <200806100104.28694.pedro@codesourcery.com> X-Mailer: VM 7.19 under Emacs 22.2.50.2 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: 2008-06/txt/msg00184.txt.bz2 > It all amounts to: > > - should there be an MI async event on -thread-select if the > reply already carries that information? But the CLI command "thread" doesn't. I think MI should try to reflect the state of GDB and the inferior. It shouldn't really matter what commands were used to put it in that state. > - if a command requires a synchronous reply, then it should be > implemented in the command itself, not in an observer. Which commands require a synchronous reply? > > How about the change below instead? This, of course, requires no change to > > mi-main.c. > > I'd really prefer to keep gdb_thread_select just an exception > wrapper, and do the observer call in do_captured_thread_select. If it goes at the end of do_captured_thread_select then I guess that will be after any exceptions but, to me, putting the logic in gdb_thread_select makes it clearer that the thread only gets reported when there is no exception. As libgdb seems to be dead in the water (gdb_breakpoint in breakpoint.c has gone altogether) do we need to be so precious about these function now? -- Nick http://www.inet.net.nz/~nickrob