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


Sorry, if I missed the discussion on it, but,

A Monday 09 June 2008 13:16:09, Nick Roberts wrote:
> ? ?annotate_thread_changed ();
> ? ?gdb_thread_select (uiout, tidstr, NULL);
> + ?observer_notify_thread_changed ();
> ?}

This is conceptually not right. gdb_thread_select is a libgdb
function, that filters exceptions.  If do_captured_thread_select
throws an error, you will still call the observer.  Plus, 
do_captured_thread_select is already printing the thread change
to MI, which means you'll get the output twice now, in MI?

Why not call the observer from inside do_captured_thread_select,
instead of on both CLI and MI commands?

-- 
Pedro Alves


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