This is the mail archive of the
mailing list for the GDB project.
Re: [RFA 09/22] Remove make_cleanup_restore_current_ui
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 09 Oct 2016 00:31:47 -0400
- Subject: Re: [RFA 09/22] Remove make_cleanup_restore_current_ui
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <email@example.com>
On 2016-09-27 00:08, Tom Tromey wrote:
+/* State for SWITCH_THRU_ALL_UIS. */
+ switch_thru_all_uis () : iter (nullptr), save_ui (¤t_ui)
+ iter = ui_list;
I just found there is a little bug here. current_ui is not set for the
first iteration, so it runs with whatever was in there before. If you
look at the previous implementation, current_ui is assigned in the _cond
function, which is executed before the first iteration. In your
version, it is assigned in the next() method, which isn't.
I noticed this because it fails gdb.mi/user-selected-context-sync.exp.