[ was: Re: [PATCH 8/9] gdb: remove iterate_over_breakpoints function ] On 10/21/21 12:20 PM, Tom de Vries wrote: > On 5/27/21 5:35 PM, Simon Marchi via Gdb-patches wrote: >> /* Create and register solib event breakpoints. PROBES is an array >> diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c >> index 738f69156485..afd51e95980c 100644 >> --- a/gdb/tui/tui-winsource.c >> +++ b/gdb/tui/tui-winsource.c >> @@ -457,7 +457,7 @@ tui_source_window_base::update_breakpoint_info >> do with it. Identify enable/disabled breakpoints as well as >> those that we already hit. */ >> tui_bp_flags mode = 0; >> - iterate_over_breakpoints ([&] (breakpoint *bp) -> bool >> + for (breakpoint *bp : all_breakpoints ()) >> { >> if (bp == being_deleted) >> return false; >> @@ -479,7 +479,8 @@ tui_source_window_base::update_breakpoint_info >> } >> } >> return false; >> - }); >> + } >> + >> if (line->break_mode != mode) >> { >> line->break_mode = mode; >> -- > > This changes a lambda function body to a loop body, but fails to update > the two returns. Consequently, showing breakpoints in tui is broken > (and unfortunately there's no test-case to detect that). > > This works for me: Now with commit log, referring to corresponding PR. OK for trunk / 11 branch ? Thanks, - Tom