This is the mail archive of the
gdb-patches@sourceware.org
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: <1474949330-4307-1-git-send-email-tom@tromey.com> <1474949330-4307-10-git-send-email-tom@tromey.com>
On 2016-09-27 00:08, Tom Tromey wrote:
+/* State for SWITCH_THRU_ALL_UIS. */
+class switch_thru_all_uis
{
+public:
+
+ switch_thru_all_uis () : iter (nullptr), save_ui (¤t_ui)
+ {
+ iter = ui_list;
+ }
Hi Tom,
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.
Simon