From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EKOkIY6QFmFhGQAAWB0awg (envelope-from ) for ; Fri, 13 Aug 2021 11:32:30 -0400 Received: by simark.ca (Postfix, from userid 112) id 786591EDFB; Fri, 13 Aug 2021 11:32:30 -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 B01D71E4A3 for ; Fri, 13 Aug 2021 11:32:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 209BE3857827 for ; Fri, 13 Aug 2021 15:32:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 209BE3857827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628868749; bh=/gOd2lhokQN+Y1w9fQ+fN9Mz52KDgS+lwYIAnk6hWZ0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KA0h0agZ7WXMShfRS4WA0HKNnHrqie3wnpTLN22AmEvshvsMg2O7HTKs7nKL4t0O+ f5E2BZNsXvZZpYvWoVcqJadCmz8uGcu/yYqG+K/GdrXcSbO5kyvak0s2uui+mkmV0i PiyZmre/FNxZjaHZgpvanEz5JEKebl7xXaVLkEKU= Received: from vimdzmsp-nwas02.bluewin.ch (vimdzmsp-nwas02.bluewin.ch [195.186.228.50]) by sourceware.org (Postfix) with ESMTPS id 76AF23969C24 for ; Fri, 13 Aug 2021 15:32:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 76AF23969C24 Received: from patrick.monnerat ([178.193.82.56]) by vimdzmsp-nwas02.bluewin.ch Swisscom AG with ESMTP id EZA8mo4BtslQjEZADm1Fbr; Fri, 13 Aug 2021 17:32:05 +0200 Received: from patrick.monnerat (localhost [127.0.0.1]) by patrick.monnerat (8.16.1/8.16.1) with ESMTPS id 17DFVndK054761 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 13 Aug 2021 17:31:49 +0200 Received: (from patrick@localhost) by patrick.monnerat (8.16.1/8.16.1/Submit) id 17DFVmrv054760; Fri, 13 Aug 2021 17:31:48 +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: Fri, 13 Aug 2021 17:31:31 +0200 Message-Id: <20210813153131.54709-1-patrick@monnerat.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfKV5ZCCKPDlmwayacFWpLiMpRucFG3j/YLxNMLpUkIdrreXT19skkpOz3CsUfyQ8LAs0eBhEHp+MgZxo6UVVZ2tpppdZAkiqpzaavXTavBUnaUbflytC LUg8e/8Fe8YvS/6JzcPjuxzoF/ZFKUkV9ZIMN69yCSzLDFUS30rKTVBhYiznHzgkVd+Y7cVFuQiU4r5W4VPd2Adlc0LQipzLPHI= 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 in currently notified of breakpoint stop before handling its auto-disabling after count is reached, the observer is never notified of the disabling. 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