This is the mail archive of the
mailing list for the GDB project.
Re: [patch:MI] Observer for thread-changed
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Nick Roberts <nickrob at snap dot net dot nz>, gdb-patches at sources dot redhat dot com, ghost at cs dot msu dot su
- Date: Mon, 9 Jun 2008 14:28:28 +0100
- Subject: Re: [patch:MI] Observer for thread-changed
- References: <email@example.com>
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?