From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30360 invoked by alias); 1 Sep 2009 05:35:35 -0000 Received: (qmail 30347 invoked by uid 22791); 1 Sep 2009 05:35:34 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Sep 2009 05:35:29 +0000 Received: (qmail 22677 invoked from network); 1 Sep 2009 05:35:25 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Sep 2009 05:35:25 -0000 From: Vladimir Prus To: tromey@redhat.com Subject: Re: =frame-selected MI notification Date: Tue, 01 Sep 2009 05:35:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.90; i686; svn-979530; 2009-06-10) Cc: gdb-patches@sources.redhat.com References: <87iqg99xb5.fsf@sphinx.net.ru> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200909010935.25258.vladimir@codesourcery.com> 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: 2009-09/txt/msg00009.txt.bz2 On Tuesday 01 September 2009 Tom Tromey wrote: > >>>>> "Volodya" == Vladimir Prus writes: > > Volodya> Furthermore, I do not think that observers for either thread or > Volodya> frame changes is good idea, design wise. The fact that gdb has > Volodya> current thread or current frame at the code level, is, IMNSHO, > Volodya> a design bug. > > I agree, for the core. But, the problem in question concerns > notification about the changes to the user's view. > > E.g., it wouldn't be unreasonable to want to write a Python script that > reacts to changes in the CLI's notion of frame. In this case, such an > observer would be useful and appropriate. Why would you want this? To implement some 'plugin' to CLI interface? Then, since current_ptid is essentially "CLI current thread", such a plugin naturally need observer to notice changes of current_ptid. However, this does not say MI should use the same observer ;-) - Volodya