From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15756 invoked by alias); 14 Jun 2008 18:52:34 -0000 Received: (qmail 15746 invoked by uid 22791); 14 Jun 2008 18:52:33 -0000 X-Spam-Check-By: sourceware.org Received: from vms173001pub.verizon.net (HELO vms173001pub.verizon.net) (206.46.173.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 14 Jun 2008 18:52:08 +0000 Received: from black ([71.245.67.80]) by vms173001.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K2G00A1LV2B4O35@vms173001.mailsrvcs.net> for gdb-patches@sourceware.org; Sat, 14 Jun 2008 13:51:48 -0500 (CDT) Received: from bob by black with local (Exim 4.69) (envelope-from ) id 1K7aqo-0008TL-OH; Sat, 14 Jun 2008 14:51:46 -0400 Date: Sat, 14 Jun 2008 19:22:00 -0000 From: Bob Rossi Subject: Re: [patch:MI] Observer for thread-changed In-reply-to: To: Tom Tromey Cc: Vladimir Prus , Daniel Jacobowitz , Nick Roberts , Pedro Alves , gdb-patches@sourceware.org Message-id: <20080614185146.GB22940@brasko.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline References: <18509.7945.19078.399646@kahikatea.snap.net.nz> <200806101027.38454.ghost@cs.msu.su> <20080610132512.GB7986@caradoc.them.org> <200806141909.37719.ghost@cs.msu.su> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) 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/msg00265.txt.bz2 On Sat, Jun 14, 2008 at 12:14:43PM -0600, Tom Tromey wrote: > Daniel> One method I use is to ask myself how complicated the documentation > Daniel> for something will be. It's much clearer to say "the notification is > Daniel> emitted whenever the active thread changes" than "... unless it > Daniel> changed because of -thread-select". > > Vladimir> I'm afraid you are oversimplifying -- the "the notification > Vladimir> is emitted whenever the active thread changes" is very nice, > Vladimir> but it's very likely that every frontend author will not > Vladimir> realize he has to ignore this notification from > Vladimir> -thread-select. So, the documentation should either say that > Vladimir> the notification is better ignored, or say that is not > Vladimir> emitted. Now, what is better? > > I think that the Python layer would like to be notified of every > thread change. That way, it will be possible to write Python > libraries which react to these kinds of events. I can tell you this. The annotate-1 interface used to send out things like breakpoints-changed whenever something happened that triggered a breakpoint change. This data would come out so fast, it would effect the performance of the front end from getting meaningful data. I'm just giving a little advice, make sure that gdb doesn't auto send out information if the inferior can manipulate itself in such a way that it would effectively flood the communication between gdb and the front end. Can thread changes happen often? how often? how will this effect the communication load? Bob Rossi