This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch:MI] Observer for thread-changed


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]