From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6v8oOn0I3GhD9BkAWB0awg (envelope-from ) for ; Tue, 30 Sep 2025 12:42:37 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=G17vz9np; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DC1F31E0B6; Tue, 30 Sep 2025 12:42:37 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 20B081E047 for ; Tue, 30 Sep 2025 12:42:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 903E83857C5F for ; Tue, 30 Sep 2025 16:42:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 903E83857C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1759250556; bh=H7X17lqVX4rkGiPy6YJnRaKLvWqcKgRh+ECA3BunEjg=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=G17vz9npT/h7qmEEkqCMpvd95Y+NLtbWk2O/fWi5Mc+vMI+W3+L0FdYJL9Hbp8uXp Zsg5DTqiGpdjLlOhku/HrLExQZ2TTwbIFdfDmdAIrX0VbFTAKe6JiR4AUsBDW8q3UO Tw8OCKRm0BWer224zoibrvqFHGGPWpYj2WCS8Gsg= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id CCF17385828B for ; Tue, 30 Sep 2025 16:41:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CCF17385828B ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CCF17385828B ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759250507; cv=none; b=ezum6H6m6OF7nA7BBMEe67TKait1MsuupxAt/I94y0KS9FfDtmCXvY+QWeoEb8mFRG5F+1XV1f7QmeTbdBh8GUhe+qYoBZzurEOhFngWPKtXAT7WkpG7CNL4iKxezOcJZg/h1wC8Endm66qcTdvF4QexvAg0fCqX9rqf+v9oJqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759250507; c=relaxed/simple; bh=Xb2X0EfQezS5p4heub3xmvIW+IMLn0L0Xqt+Fzg9Z/Y=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=D03HHFRmZtUCh4vPAYLlPjO02fsaLvted/BZpYNnWRh8cW/M4P7t1kO0KnUN0p3elzPmaTQnuVFvL3nInMmZB8MgVedaVfVAjeeRLxrv0E1dw0yIXVdNXRhhEFBWdsY0HGDEW0opJAl6up1m9WifEsDwLTaasbxLCvT/DByfLNM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCF17385828B Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v3dQ8-0003KK-Lw; Tue, 30 Sep 2025 12:41:45 -0400 Message-ID: <1bc5b9b3-a174-437c-bed4-ceabe0927f6b@gnu.org> Date: Tue, 30 Sep 2025 18:41:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: python API to trigger a "select-frame" like event with a given location To: Andrew Burgess , gdb@sourceware.org References: <35f6cb30-6118-4c3d-9c5a-2f819e6b7c6c@gnu.org> <87cy78dklf.fsf@redhat.com> Content-Language: en-US Autocrypt: addr=simonsobisch@gnu.org; keydata= xsFNBFYqhRcBEADATB6IkCbXgBYG/1w5BzcfMWQuiXwzHbDxvsJ+rplZkgaR4jcJK6eym24h UKnDstGKgRFbIal0QjKIPUcLaerja+GzkAZYbTQSAQtioZRULwyQ9xRmHcYpMdf/57cIqO9a QhL35uaWNAfjKPejsTEnOPoTecx7G5HJIEswjTA1D9vr1yqkeYKe/t3MlyQ5Z1sQnIZQJvTM S0GJBjqzOQsadoajsx+OJXGDhhGHTO3KicPVUL/A/idWK261GfGidw9MnsxicgjHRFAQUi6d yR/jWempMD3+pJtaK5LfKR7BZq7EqCnHZL0z2hDJ9KcBaH9bY4lcP3490iuZAHIatP1fQp26 LihTNu5wkcstUx412lPeIFMLmLhmTaFHjmcSF1NyJpEAAERXm1gj6dF9a/GuIieCnzcJb2hk PX6nOawFEiRYSnNzswiOEviOU4qcx8jWVwh/9hTpezH1shs/8OIfZXnwZS0D6ShdMbALxEOF lpqWP8w3peM9Qd5nl8R5KOauzLV8rW1lZtdvTGsGfBdSorJBKPXEO7z7fHMkWTwq1uSq4AoY zvV2aCD8EKL5YLQ+RrcCsRXecaTMM25r9NNlKMV1uvZjhZqosL9vk1x27L16y7B7upJ3A7qY UovdwFiZS1PthdsGQ5booWRN/eP63yGFnM3Y18pTncrc+Drs1wARAQABzRRzaW1vbnNvYmlz Y2hAZ251Lm9yZ8LBlAQTAQgAPgIbIwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBLlFnQyo p0CzIyNc3xPpa1PABWBOBQJ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HBW+Q In-Reply-To: <87cy78dklf.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 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" Am 30.09.2025 um 17:30 schrieb Andrew Burgess: > Simon Sobisch via Gdb writes: > >> using a frame filter and decorator I can drop "not interesting" frames >> and add "artificial - display only" ones: >> >> >> Instead of >> >> (gdb) backtrace >> >> #0 PROG2_ (...) at copybook.cpy:14 >> #1 PROG2 (...) at progb.cob:127 >> #2 PROG1_ (...) at init.cpy:21 >> #3 PROG1 (...) at prog.cob:139 >> #4 main (...) at prog.c:23223 >> >> I can show (combined with >> >> (gdb) mybacktrace >> >> #0 PROG2_ (...) at copybook.cpy:14 >> #0.0 COPYFUNC SECTION at copybook.cpy:14 >> #0.1 PROGFIN SECTION at progb.cob:521 >> #0.2 PROGMAIN SECTION at progb.cob:195 >> #0.3 PROG2 at progb.cob:127 >> #2 PROG1_ (...) at init.cpy:21 >> #2.0 PROG-INIT-EXT SECTION at init.cpy:21 >> #2.1 PROG-INIT SECTION at init.cpy:41 >> #2.2 MAIN-000 SECTION at proga.cob:139 >> #2.3 PROG1 at proga.cob:139 >> >> >> Also there's the option to add myup and mydown commands which select the >> "expected" frame (0 and 2, in this example) where all the relevant >> variables are defined. >> >> >> But currently I see no way to programmatically "select" by location >> (frame + linespec/LOCATION) [which would, other than "list" also be >> passed to UIs/MI). >> >> Is there an option that I've overlooked? >> >> >> If not: could there be an extension to "select-frame level" >> >> select-frame level LOCATION >> >> select-frame level -- Select a stack frame by level and show LOCATION in >> the UI >> >> or a new command >> >> show-location LOCATION >> >> that executes what select-frame does, but _without_ selecting anything >> (calling interps_notify() with the location as "selection")? > > If I understand what you need, then you are looking for way to implement > your 'myup' and 'mydown' commands such that GDB will appear to move > though the artificial frames (e.g. 0.0, 0.1, 0.2, 0.3, etc). To do this > you need to select the real frame (#0), but then want some way such that > GDB will notify the various UI's to indicate that their focus should > shift to the source locations corresponding to the artificial frames, > right? Exactly > You mention, but seem to dismiss, using 'list'. Can you expand on why > this doesn't meet your needs? Because "list" sends no events, so registered mi clients (Emacs, vim, fancy-ide-of-your-choice) have no info on that. > Which UIs in particular is it that you are interested in seeing update? > I ask because I'm wondering which events it is that would need to be > emitted. Could you expand with some user stories, which UI is the user > looking at, what actions do they perform, and what is updated as a > consequence. Likely "list" will also not apply to TUI's assembly window, which handles "up" and "down" just fine - so that would be another one. > Thanks, > Andrew Thanks for taking the time to read and answer in the first place! Simon