From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GMOaLGPxFmHpIwAAWB0awg (envelope-from ) for ; Fri, 13 Aug 2021 18:25:39 -0400 Received: by simark.ca (Postfix, from userid 112) id 9F1DB1EDFB; Fri, 13 Aug 2021 18:25:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,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 040EC1E79C for ; Fri, 13 Aug 2021 18:25:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4B7B33855032 for ; Fri, 13 Aug 2021 22:25:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B7B33855032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628893538; bh=eCcGsikKIu1RiCS+F6GBQLeZDfR26F1WRcvHLffPujI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=egIdODQliYPygVOBpcB3koRzZNG5NvVwcEIl7nEzGo8XqDmxNjlTzXoLKLPSpOsti oE8S9XXMuJe8skKvpmemvPvtIog0TacS4NNyFWTXghFjIEbdo/kzP/vvXekR+N82jt uNdnQ12fuaMSaK9dV+YbKZKDlkMGI8cc2s4aEaKU= Received: from vimdzmsp-nwas02.bluewin.ch (vimdzmsp-nwas02.bluewin.ch [195.186.228.50]) by sourceware.org (Postfix) with ESMTPS id 95ACA385840D for ; Fri, 13 Aug 2021 22:25:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95ACA385840D Received: from patrick.monnerat ([178.193.82.56]) by vimdzmsp-nwas02.bluewin.ch Swisscom AG with ESMTP id Efbsmp1O8slQjEfbxm1QI8; Sat, 14 Aug 2021 00:25:09 +0200 Received: from patrick.monnerat (localhost [127.0.0.1]) by patrick.monnerat (8.16.1/8.16.1) with ESMTPS id 17DMOsNj003186 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 14 Aug 2021 00:24:54 +0200 Received: (from patrick@localhost) by patrick.monnerat (8.16.1/8.16.1/Submit) id 17DMOTAE003123; Sat, 14 Aug 2021 00:24:29 +0200 X-Authentication-Warning: patrick.monnerat: patrick set sender to patrick@monnerat.net using -f To: gdb-patches@sourceware.org Subject: [PATCH] Notify observer of breakpoint auto-disabling Date: Sat, 14 Aug 2021 00:24:11 +0200 Message-Id: <20210813222411.3076-1-patrick@monnerat.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfKhO2gJEP5AzTvlb32Lj4LvYNM6oMCU7YvDt9qIFnSDj/qotwYqkI6N/xxlh/LVYukBzXUEm9i0cji/XP6rgru0Y4o0eG3msDY78z8HFx7Vf6WOKIIB9 Bhzh3nol0ylHhfXnfe60afs4DCHvZgYOZy3CxRuHuGEHSbdkDhFeN+7ov3fuVDiWrimkrmHRLOfjMsI80UT5d9TdyeuSdZB5+aA= 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: Patrick Monnerat via Gdb-patches Reply-To: Patrick Monnerat Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" As observer is currently notified of breakpoint stop before handling its auto-disabling after count is reached, the observer is never notified of the disabling. The problem does not seem to affect gdb alone. However it impacts insight: breakpoint GUI window is not properly updated upon auto-disable. This patch moves the observer notification after the auto-disabling code. Fixes https://sourceware.org/bugzilla/show_bug.cgi?id=23336 * gdb/breakpoint.c (bpstat_stop_status): move observer notification after auto-disabling code. --- gdb/breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 89af44ee4c6..feca224ccf4 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5491,7 +5491,6 @@ bpstat_stop_status (const address_space *aspace, if (bs->stop) { ++(b->hit_count); - gdb::observers::breakpoint_modified.notify (b); /* We will stop here. */ if (b->disposition == disp_disable) @@ -5501,6 +5500,7 @@ bpstat_stop_status (const address_space *aspace, b->enable_state = bp_disabled; removed_any = 1; } + gdb::observers::breakpoint_modified.notify (b); if (b->silent) bs->print = 0; bs->commands = b->commands; -- 2.31.1