From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bGxECLH322gp4BkAWB0awg (envelope-from ) for ; Tue, 30 Sep 2025 11:30:57 -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=heq9ZWuw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 129771E047; Tue, 30 Sep 2025 11:30:57 -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 76AD31E047 for ; Tue, 30 Sep 2025 11:30:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1BE443857C6E for ; Tue, 30 Sep 2025 15:30:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BE443857C6E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1759246256; bh=v1UeJGewfwjS3H/Wu8Mww6JmwTUrQCSU8WSUzgBvhd4=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=heq9ZWuweX69a3JxZJdRRE+3BM0GW6IPhiJ/b8rVz3IhOeqT4NYe/V7ovZjobrVya ybDpV97oNEsFDEQSi4oDkGSgYD7ayhd+WcFrkks/ROdsNAhf3SDgeQlSmZhFGN3ArZ mhiZOUOfXpKemY+pEpcjSrCyxzUByyPUDUrNIKZU= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 540BD3858D35 for ; Tue, 30 Sep 2025 15:30:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 540BD3858D35 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 540BD3858D35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759246209; cv=none; b=k03GeJ5HzXmf4QSkmCnz0ucWfDTR7G0et3q3MtBlOEoowS6AoIokZC2fCmrPHScTyLFuiIXbfDb3kxRDwyztWiugoxg3xyAEahJ0Aa7po50wJlmjNiz64FmLPauSLO3v+kVo6bq8lWWiLj7b/N+nyPABRp5rHtRHGvx5M1kwwns= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759246209; c=relaxed/simple; bh=K+p8ULYifagLnVJYfgzTtXQG0SDNRh63bcvgPCwD+34=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PBdSsKRA6IcpWqkzYzH4vj8ONnHZtlXZ4sJPHyipYZVm8hDABUnqQNi2r7oUGeTb5JcV15DoDT/P/O+sKTXSf8ZKDVqhoPGu6uzhxDxt6itMhp9CexzW7HlrRgXIHfhmuM1DQCGQI2GTWOLcPIF2l8n/FF3nlALl0UKnMsEzLhY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 540BD3858D35 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-aWUHtTahOwG5DXCOClPMjQ-1; Tue, 30 Sep 2025 11:30:07 -0400 X-MC-Unique: aWUHtTahOwG5DXCOClPMjQ-1 X-Mimecast-MFC-AGG-ID: aWUHtTahOwG5DXCOClPMjQ_1759246207 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-46e36f9c651so47868205e9.3 for ; Tue, 30 Sep 2025 08:30:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759246206; x=1759851006; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=v1UeJGewfwjS3H/Wu8Mww6JmwTUrQCSU8WSUzgBvhd4=; b=NMsHFkQ2kK+QLSPQIlcOHj4uhsB0VOMWnMzmZ7nD9yO+kv5zW8GFLXtItxaG4xk1xx kcyGVAM7ranTEPdwoCVz7enjbpxZZWErowTm0SYMjUs7jcmZbI3dmaOkVh4rxSsETGZM lUaA/rqlhWA59PumP/YUeuNG6tFXeAQw/QhadPEe/CBQQStyiq5Ae0hSL0BXmWFtm9Ym YRYtazySOTNfezr8/BBojPsuRs7KKa4uYYO3xP8fBgOJHkLhmXkfGRu9yDLB8KBSAfWo BCvdl5UNpg29SHQSOw+gVSlcccsg+jh+ohr6xhtYQeRDl8DIvMtDkixVI04nziAUwu0x pnmw== X-Forwarded-Encrypted: i=1; AJvYcCXjPnb5MWeV2VrybMBBvumaZfU5VX5FVyD9VpjmGDXLH7CTX0iGRSX/jgYgdAf171rkWzk=@sourceware.org X-Gm-Message-State: AOJu0Yyz1AN5u/FfPLzUZycPY3h9e5z5z41EVGllOwWIoB1eUpx8ROQt FT7HPmhPV2nkCnagsi7lxSVw4ovipZtleWVa/UHm2T/yrAYWz6o6AcAAzk0VHZ7jYOJH5V3I82G zR2CuE4pcIvBbtggpHYymw75VQJbONeGV9RsXIZH2vqTb+oa9BuY25USkS0U3 X-Gm-Gg: ASbGncvmat7ZTsCIEdSs0dv0Dl4ipVRoeM41NvjMUVw8ZJEocEdMTu4isav9u5edMSz CFSC6We1BfQ01M+2l48781tE/dxALYuZsCNff6lnQC+tUyfTtj/FISXxoXMwtXrfV8K7zYTmnya ZRx/omF6+Ra6Pp72N2wXaNWYc1bkdgHHuvGcET+xXRZiGd3/3c4pq/5vbmoilMWjIDJd2tEIRfa Ys5X/B808CoheInsABIIp9z0EhNbjiEQoB6m8ufhFRLo0WNUBTuuRrH8qOymwxneOhTgXB4/7+3 kjI+CluwJZY3mYWTYTXuoG19+PzYlA6SFiS3idYl X-Received: by 2002:a05:600c:3b13:b0:46e:448a:1235 with SMTP id 5b1f17b1804b1-46e612861fcmr3348595e9.16.1759246206188; Tue, 30 Sep 2025 08:30:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyz9WJRjCiSMBb3ssVpPJ2/wc6A0v/O0zTuu0Tv9hxVozJ8tqfguJBRcgRbMctwuL2qiltzA== X-Received: by 2002:a05:600c:3b13:b0:46e:448a:1235 with SMTP id 5b1f17b1804b1-46e612861fcmr3348295e9.16.1759246205758; Tue, 30 Sep 2025 08:30:05 -0700 (PDT) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e5b576badsm17622305e9.0.2025.09.30.08.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Sep 2025 08:30:05 -0700 (PDT) To: Simon Sobisch , gdb@sourceware.org Subject: Re: python API to trigger a "select-frame" like event with a given location In-Reply-To: <35f6cb30-6118-4c3d-9c5a-2f819e6b7c6c@gnu.org> References: <35f6cb30-6118-4c3d-9c5a-2f819e6b7c6c@gnu.org> Date: Tue, 30 Sep 2025 16:30:04 +0100 Message-ID: <87cy78dklf.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fJmU20JsU-YQe_pepFNarQM50Kj1xCuSNl9wd1cwiaY_1759246207 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: Andrew Burgess via Gdb Reply-To: Andrew Burgess Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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? You mention, but seem to dismiss, using 'list'. Can you expand on why this doesn't meet your needs? 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. Thanks, Andrew