From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23409 invoked by alias); 10 Jun 2008 13:25:41 -0000 Received: (qmail 23393 invoked by uid 22791); 10 Jun 2008 13:25:39 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jun 2008 13:25:20 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E95599840C; Tue, 10 Jun 2008 13:25:16 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 7551F9810F; Tue, 10 Jun 2008 13:25:14 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1K63qb-00027B-05; Tue, 10 Jun 2008 09:25:13 -0400 Date: Tue, 10 Jun 2008 17:23:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: Nick Roberts , Pedro Alves , gdb-patches@sourceware.org Subject: Re: [patch:MI] Observer for thread-changed Message-ID: <20080610132512.GB7986@caradoc.them.org> Mail-Followup-To: Vladimir Prus , Nick Roberts , Pedro Alves , gdb-patches@sourceware.org References: <18509.7945.19078.399646@kahikatea.snap.net.nz> <200806100104.28694.pedro@codesourcery.com> <18509.57602.879804.675918@kahikatea.snap.net.nz> <200806101027.38454.ghost@cs.msu.su> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200806101027.38454.ghost@cs.msu.su> User-Agent: Mutt/1.5.17 (2008-05-11) 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/msg00203.txt.bz2 On Tue, Jun 10, 2008 at 10:27:38AM +0400, Vladimir Prus wrote: > The question, then, if whether -thread-select should output this notification? > Suppose a frontend uses -thread-select to get some data in some thread without > making it selected. Then, if a notification is emitted, the frontend has to > take special care not to mark the thread as selected in GUI. > > As an aside, this is similar to notifications/signals in GUI libraries -- for > example, line edit control often has 'text changed' signal. If this signal is > emitted even when the text is changed programmatically, the application > often has to specially prevent signals emitted as result of programmatic change > to be handled as if it was the user input. > > So, I think that -thread-select *should not* emit thread-changed notification. > With the original version of your patch, it would be a one-line change, it's > probably a bit harder with the last version. One method I use is to ask myself how complicated the documentation for something will be. It's much clearer to say "the notification is emitted whenever the active thread changes" than "... unless it changed because of -thread-select". Will detecting notifications due to its own commands be that complicated for any IDE? -- Daniel Jacobowitz CodeSourcery