From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hFnOAxN5cWHXTgAAWB0awg (envelope-from ) for ; Thu, 21 Oct 2021 10:28:35 -0400 Received: by simark.ca (Postfix, from userid 112) id 0554B1F0BD; Thu, 21 Oct 2021 10:28:35 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 303D41E79C for ; Thu, 21 Oct 2021 10:28:34 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD94C3857801 for ; Thu, 21 Oct 2021 14:28:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD94C3857801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1634826513; bh=zwXFu9/99rSUwGlTzo0qyJegwO6sE3bT3GS4fF5WcB4=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=saTwgNEozHDxL3WureawYUQ7yyvgBrwVzJiGaRfGzyV8H+ISEKu9NbT69l2WO2sLi 5AdEru7/8nq0q3EEC+YxnfiS9U/Gqm5V3OnkzdkWv9Eq/kHsmQkGwPLf7dAUZ6cn8o rWQilWDyTP4tAIuI6bI4LSNT9cjFJwjSw3EyDBug= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 84CDF3858C60 for ; Thu, 21 Oct 2021 14:28:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 84CDF3858C60 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 19LES8x1031107 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Oct 2021 10:28:13 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 19LES8x1031107 Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 5B5F71E79C; Thu, 21 Oct 2021 10:28:08 -0400 (EDT) Subject: Re: [PATCH, master + 11][gdb/tui] Fix breakpoint display functionality To: Tom de Vries , gdb-patches@sourceware.org References: <20210527153558.3016335-1-simon.marchi@polymtl.ca> <20210527153558.3016335-9-simon.marchi@polymtl.ca> <83f04dc4-f756-0363-2e07-f81a6c384007@suse.de> <13493139-7bee-fb1e-f72a-6fdc36ac5b5d@suse.de> <265fd71d-ee7f-489c-bcb5-dfa86a1d18bb@suse.de> Message-ID: Date: Thu, 21 Oct 2021 10:28:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <265fd71d-ee7f-489c-bcb5-dfa86a1d18bb@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 21 Oct 2021 14:28:08 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Cc: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-10-21 8:10 a.m., Tom de Vries wrote: > On 10/21/21 1:29 PM, Tom de Vries wrote: >> [ 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 ? > > Now also included test-case. > > Thanks, > - Tom > Woops, LGTM, thanks. Simon