From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 50968385840F for ; Mon, 25 Jul 2022 17:02:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 50968385840F Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (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 14CE31E21F; Mon, 25 Jul 2022 13:02:45 -0400 (EDT) Message-ID: <7663ddf6-82f7-5d4f-836a-e0a93daa0f2b@simark.ca> Date: Mon, 25 Jul 2022 13:02:45 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Content-Language: en-US To: Ciaran Woodward , gdb-patches@sourceware.org References: <20220725162231.4473-1-ciaranwoodward@xmos.com> From: Simon Marchi In-Reply-To: <20220725162231.4473-1-ciaranwoodward@xmos.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 25 Jul 2022 17:02:47 -0000 On 2022-07-25 12:22, Ciaran Woodward wrote: > Rationale/background: > When using schedule-multiple (sched_multi) in gdb, all inferiors > are set to continue when the c command is used. However, before > this patch, only the 'current' inferior would have its > control->stop_soon field cleared. This field causes certain stops > to be ignored, and is only intended for initial attach. > > By not clearing this field before continue, continuing with inferior 2 > in focus and with inferior 1 hitting the next breakpoint, would cause > gdb to ignore the breakpoint and any attempt to stop the target with > Ctrl-C following that - even though the target was already stopped. > The only fix was to quit GDB and restart. > > Solution: > With this patch, all inferiors being resumed have their > control->stop_soon fields cleared, so gdb does not ignore the > breakpoints of any inferior inadvertently. Hi Ciaran, Can you please provide some reproducing steps? Some simple test programs along with the sequence of GDB commands to use. This way, we'll be sure we look at the same problem. Simon