[patch:MI] Observer for thread-changed

Pedro Alves pedro@codesourcery.com
Mon Jun 9 13:36:00 GMT 2008


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



More information about the Gdb-patches mailing list