From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wlLmA4xurmEoLAAAWB0awg (envelope-from ) for ; Mon, 06 Dec 2021 15:11:56 -0500 Received: by simark.ca (Postfix, from userid 112) id 004DE1F0CE; Mon, 6 Dec 2021 15:11:55 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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 7E4D01E940 for ; Mon, 6 Dec 2021 15:11:55 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A990C3858431 for ; Mon, 6 Dec 2021 20:11:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A990C3858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1638821514; bh=b0n4IM7TDXUeaGwSuWL2gEjNoXGWITYx3GboYLbBySM=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tAglyzaYLvoQfdyqTOlhYBFhsT/pXfjJxvTSeT9hPwSqiLjlNvABFlTkK6sKbQzui WJPC4PiWSLYNF2SHcnNPa8a9w0QXK3XzUVEvexWFhp+2uKRkj/JT1O2RYDmptm50k0 Arm23uqTMGWOI/c8yrLd7L+jkRP458oJzJ5BCehc= Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id BC29B3858401 for ; Mon, 6 Dec 2021 20:11:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BC29B3858401 Received: from [2001:470:142:3::e] (port=39980 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muKKe-00020J-4w for gdb@sourceware.org; Mon, 06 Dec 2021 15:11:28 -0500 Received: from ip5f5a8896.dynamic.kabel-deutschland.de ([95.90.136.150]:55173 helo=[192.168.111.41]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muKKd-0007Si-PQ for gdb@sourceware.org; Mon, 06 Dec 2021 15:11:28 -0500 Message-ID: <74ce7f64-4368-aee4-1150-28cbd9cc6ae1@gnu.org> Date: Mon, 6 Dec 2021 21:11:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: How to recognize `exec-interrupt` via Python events To: gdb@sourceware.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Sobisch via Gdb Reply-To: Simon Sobisch Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" It is possible that I've just overlooked something, but I can't seem to get an event triggered at all: gdb.events.stop.connect(stop_handler) is triggered after each step/next, a expected; also on signals including SIGINT, also when pressing CTRL+C when the inferior is running, type can be checked with if type(event) is gdb.StopEvent When the MI frontend (Vim in this case, but this should also apply to Emacs and others) executes `-exec-step` or `-exec-next` the event is triggered, when the inferior is running and a breakpoint/watchpint is triggered, too. But when the inferior is running and `-exec-interrupt` is triggered then the python code seems to not get an event at all - do I need to connect to a different event registry? The main _problem_ that this issue creates lies in the GDB python extension implementing an "auto-step" (starter code at [1]) and stopping when interrupted... but now I see that this does not work with clients that interrupt with `-exec-interrupt`, which _does_ stop the running process, but the python extension does not recognize it and steps further, so the interrupt is actually not working. [1]: https://stackoverflow.com/a/67470758/5027456 Note: the new and better one catching more events and implementing a gdb.Parameter got lost there, I'll update that answerit when I know how to solve this issue.