From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SY1ODmjm42gixSEAWB0awg (envelope-from ) for ; Mon, 06 Oct 2025 11:55:20 -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=vnPy3cFI; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 379211E0B6; Mon, 06 Oct 2025 11:55:20 -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 8AA681E047 for ; Mon, 06 Oct 2025 11:55:19 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 124593858CD1 for ; Mon, 6 Oct 2025 15:55:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 124593858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1759766119; bh=834khpv4PwKJybYjQ3Vn08fBv1PTVNvtH4+g/BYxSD4=; 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=vnPy3cFIZLNpBCKkoQw4TdBNlv5ZtMBySozdlXohvegqVAW2GIUQvM70KToOmSHiG 3OSOV3bnHXcK43v+ZDc6pIfqbQyRVBBdHKytdQZmVYONNrPUFMlhGMUr+ybZZLINQB Iy01DtYAY9Qzpm+z2FHOu7wgMi9JFo1yXBCaP+3A= 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 6CD3A3858D1E for ; Mon, 6 Oct 2025 15:54:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6CD3A3858D1E ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6CD3A3858D1E ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759766065; cv=none; b=mKbRswzsizdENe6O4/LynCN5WtBDHBMdLVXeoQtlcwIlF4ZDsJdtJntCxKR/1StIq1VLYn0YbiWh8IPVx0HDsOlQBGbWqr/R1ZFox5Y8YtVwbtn9RcE8N4zN2Ww3A3C5G01HwN/YHWrQ0tjFyL7JDDyiuDj1RCjR3KrkLHX+nEc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759766065; c=relaxed/simple; bh=VR9D11IfLGbD8rn7zczNWiGzOMrT6wbJksLUiHI6IEY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=OWJp0A3tt4+hQGTSWYJa3BNUxUl5cuIWFLof2/hyH//MPuikMDoj2+OoqHIoXOVNKhvxQr6cnyzrXRBk0Eu+PORc2axfR+MHzmdstP0RoHPIE+e2Iv86KdbY4YhAQov5Zj4BYW8zRaeizB+2DbT/es8RekLyVn3Lp6JAEAxhgb0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CD3A3858D1E Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-509-orNPZI96PgKLncYqUVDbtw-1; Mon, 06 Oct 2025 11:54:23 -0400 X-MC-Unique: orNPZI96PgKLncYqUVDbtw-1 X-Mimecast-MFC-AGG-ID: orNPZI96PgKLncYqUVDbtw_1759766063 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-46e39567579so23024845e9.0 for ; Mon, 06 Oct 2025 08:54:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759766063; x=1760370863; 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=834khpv4PwKJybYjQ3Vn08fBv1PTVNvtH4+g/BYxSD4=; b=E0dl9+z20T7RgJnX/SO2kg5umdwsVmVKRQX4IbGuuRW8VH+ou1/PE/5iBWyPdO30ps 6hvg/RSC2zitCITJm+itOITEeNWHaECcpHOnJ+371EQkpVU4KOPAMjIA7WV9ViKPJ7t+ KEGeFtY3OVjvqN19hDLOKVi+NUnuCG74OReEkssKu9dXvzPb4spkZJcnV69y7YW2FtbG sXXptBcdqv/4sKxpwhtILk2iQ3jl8dtRHgryGniz5sl0uvDSCt9B7jAZ7DU6qMgg62oV p/px/r+I1XGqC5HZkbeNVcDtDNIFh9qlx50dmF3V6z4YRy2edDJQZU2tDRp+Y1+fo6S5 HpLA== X-Forwarded-Encrypted: i=1; AJvYcCV8NH4QQftIqZvhAdx/p7hk4vfcUdzOSPnRhy5tSKvEpwXRZwaTYY9QyUGIYKDz5AmadMg=@sourceware.org X-Gm-Message-State: AOJu0YzO11CuDhgGkmXtgsN5R2iX49OrbWa+hWM5aPL6seYHI4DFh0L9 OLF7deeElGvv38Ybe/tobWMcCuGMrKSwxFbqCVgHOhLmMq6LbEUH8DSZGdDOLuFKiOBF50Btyxs CZkHhmQYJ8a4CF/sL8WfN23H31+lEvisWklglx7qAzOcQ3RpAKLN9 X-Gm-Gg: ASbGncvjzAg1EgWgm2mpp5Xxd+t3/CMauMM59jXhAp0PEYolmEYzXxRcCF4HSGjS2PW kpsgbobHngc4PJTbWobOyb667BQ8uCz1tCOsN7DNMXG8Vtr8b8LGh2MAAtNxxs8BxGgEq02S91A KnrUU2J2Z7BdiKHmMJ63kVd7Dc66gYsTFp9yq6OAGIqUuBnmffjM10mkVBYw4xcdAUU5YreO88W agaZXgaqG13jUXJTk5val+qZ0xiynxFIKTwB5FPXGZxizw3XSsW2EOk5kZ+sqKGAp9jteLqabdy rdhQzFv6rWBvJvm6P+ZwKjcc3syXM4ez1aDHAPvK X-Received: by 2002:a05:600c:3b12:b0:46e:4e6d:79f4 with SMTP id 5b1f17b1804b1-46e7110efbemr87157795e9.15.1759766062654; Mon, 06 Oct 2025 08:54:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErMcWe/OBqNg6+KyJ+TlJkDRpOnQP1qhHrn1Keq/deUUUYV359p3GLSaJ1Tu5QqbbTrv7u5A== X-Received: by 2002:a05:600c:3b12:b0:46e:4e6d:79f4 with SMTP id 5b1f17b1804b1-46e7110efbemr87157585e9.15.1759766062219; Mon, 06 Oct 2025 08:54:22 -0700 (PDT) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e77972d2csm125315295e9.5.2025.10.06.08.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Oct 2025 08:54:21 -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: <1bc5b9b3-a174-437c-bed4-ceabe0927f6b@gnu.org> References: <35f6cb30-6118-4c3d-9c5a-2f819e6b7c6c@gnu.org> <87cy78dklf.fsf@redhat.com> <1bc5b9b3-a174-437c-bed4-ceabe0927f6b@gnu.org> Date: Mon, 06 Oct 2025 16:54:21 +0100 Message-ID: <87ecrg6n6a.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: P-FIS3lemSrM6fDPXA8aXrkcP9aGMnisvk2siB4hmko_1759766063 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 writes: > 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! Thanks for clarifying. I read through the bug Tom linked[1], and it appears solving this might be quite an involved problem. Though this is the sort of thing that does interest me, I don't have time to work on this at the moment. I've added the bug to my "interesting bug" backlog, so might get to it one day, if nobody else does first. Sorry I couldn't be more help. Thanks, Andrew [1] https://sourceware.org/bugzilla/show_bug.cgi?id=18567 > Simon