From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2Y4oJUEe42pbuAYAWB0awg (envelope-from ) for ; Thu, 29 Oct 2026 06:21:53 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OiAPvM1h; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 93E4A1E023; Thu, 29 Oct 2026 06:21:53 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (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 CCBD91E023 for ; Thu, 29 Oct 2026 06:21:52 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 66AFF4BA23F0 for ; Thu, 29 Oct 2026 10:21:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66AFF4BA23F0 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OiAPvM1h 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 136C44BA23DA for ; Thu, 29 Oct 2026 10:21:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 136C44BA23DA Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 136C44BA23DA Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793269261; cv=none; b=AeE8x4PZnCBbwKmGKo1zfKZ9NXo+p+rXGWpH4mVH9sebqbUllmQsFI4VRqzWm5UZosvYPY3GYwuCXiu8teML6neypLfL6c6LvEVxzrB9FcWRxB2ADdAdLsyYAP4K/yjcaGPAxn6Mx7hyr70SyaHuo/1bY6eZAJtBuda8VKqJ55o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793269261; c=relaxed/simple; bh=eemdi4VcXCLJ0BQBPjqyLCsQZcPH2rPJoE3bDKeWxyg=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Okgnca30vJeQhoHt1APAkIX5WPkBFMxyT1gWnuHOXzZfa3QYuRLzcId9P5IclPv/kPqrWA6tl/45vcwtBCDCry6aHxUYA9prlrkPSeiGmOcPzmxntn++z6NcSNNz8eD3LqdjQMPOsoLkFRQOx8RBCuBBmFjszR7XUL+6Nuhk7bg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OiAPvM1h DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 136C44BA23DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793269260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M3FgTyHUQqiWl36558f3qz38rWlwm9ZaIiBka53l5Yg=; b=OiAPvM1hSGzcDXApjI51SMUNasXv6wNABbMF/RakXOP+QP0eQfsqY7KIRwn4zbfG+RkMQH W6rz/JOBlMxhwaA7zuRbmK39fuvR8jlkM65C/o7q5Q0Trj0g4PlfCg5ks48EJXw6rAFyV6 aCI5m6ERlC4eYyp9uWdr07GZ3L0shBA= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-VIUQa5GTNoCA811on5wYQQ-1; Thu, 29 Oct 2026 06:20:59 -0400 X-MC-Unique: VIUQa5GTNoCA811on5wYQQ-1 X-Mimecast-MFC-AGG-ID: VIUQa5GTNoCA811on5wYQQ_1793269258 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-48e0461e040so1516689f8f.0 for ; Thu, 29 Oct 2026 03:20:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793269258; x=1793874058; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=M3FgTyHUQqiWl36558f3qz38rWlwm9ZaIiBka53l5Yg=; b=ygIolU9Y5LPFJA9BzWetC3kd+lYog0dSzJ1GcwAgqKbCr7lG1nXF0NxFuGxKSPVtWb HHfEWlUDkruaBHiW15fu6fiVU5SYH/9igDi5d863Vg8eCeK8H4guqScXOiJNT3FULB8x Euf79EaDrZpyGGd2Mh+X1GymRJkNEAv68PRYzKArhYX1LbMaWNWZI5cAX8/2p7lePKJf ynnO0oTfjl3kMKwB6ujDtEeZvEVQ+jyRY/DwIfLNS1yOB+v9JJhAWaBowP2rGQk6QnwE /DbuRlWHMwzllu6yWgSn7HoH4UtniLoHBq72UJi5m3q094je9nM1lxiSG+6F2SdFeAx0 WYdw== X-Gm-Message-State: AFq9FYJOtdY3W7IahbiLgDF6+epHFuX6MviMAKp6StQ+C6KIIutla3gy bnpK9pxp1Af9ul+cZ7YH2JcWziViPTN+Zi7+8tlOt0AGtkcwXSQ0z/doXlJ6kxYV9iastwIewwK bHfLjGkItWeLxMWjX0yhq0Ci2zCeGsrxyrcmGNzRCmAHeSvXDjunu9EqQWDl01jcPQRF2vThvS+ 2RqYdGjmmJlEuOxjyrKQbgW+M1GgyGvjmyQZ/TsbAOQ/yIe+8= X-Gm-Gg: AYBFou3iEJtHZl7GXzyPt1l0xQOyhV1UdjVUlFRPbWPogAFii2jkHR2URAbPEnQcbt8 DCJRJ3XxfclLD+RPxRg88D0roK3lF4clfOOKEDyylhcC1ORjywXNSxT6FboyihgYw1iNay0bKp3 +c72pxfzU0LPrutRbtcIYWUhKTvI4oC5uhus/g8yc722uW8yvjhbc5geLiTUCKWonfMB4NM7Nzy ElUKfMRdH7MIdP83XEUA15A+wBSH9VPINbXkBBqmTUtdoWr9zrQ3lQ54vrX7eAwmY7/Aihw8aKW DAmZ456g+HW13wrToWEdP2U6isaV+RnBuXqd7Y7/GrNBw3NFDL6pg92n/L3enrIpaXMEeOHCHHo 9uaN7rYspFWIAtq5Gg3B0Rw9wHa8EsAcTvUuFT/zYVmOq/qE= X-Received: by 2002:a05:600c:3510:b0:4a4:7a8d:c436 with SMTP id 5b1f17b1804b1-4a96667dd75mr103546215e9.11.1793269257636; Thu, 29 Oct 2026 03:20:57 -0700 (PDT) X-Received: by 2002:a05:600c:3510:b0:4a4:7a8d:c436 with SMTP id 5b1f17b1804b1-4a96667dd75mr103545685e9.11.1793269257081; Thu, 29 Oct 2026 03:20:57 -0700 (PDT) Received: from localhost ([2a00:23c6:e11d:fb01:6748:4fce:3e30:6e23]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a92e103d91sm58380965e9.0.2026.10.29.03.20.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2026 03:20:56 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv10 0/5] gdb: allow 'until' to work in outermost frame Date: Thu, 29 Oct 2026 10:20:46 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 2AIm0d2M3rVUizgCf6i3Kg2cRRuoTrsLMihYDPx8Bqg_1793269258 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org In v10: - Update to current HEAD of master. This picks up the multi-solib_ops work that was merged in September. - Patch #1 from the v10 series is new, this makes some 'const' changes to the multi-solib_ops support to allow the later patches to build. - Patch #3 (old patch #2) has had a small tweak to adapt to the multi-solib_ops work, this is all in program_space::get_entry_point_info. I have left the approved-by tag in place on this commit though as I think the change is small and obvious enough. - Patch #4 has a new bug link suggested by Simon. - Patches #1, #4, and #5 still need review/approval. In v9: - Rewrote patch #3 to address Simon's review feedback. There's no longer a distinction made between the inferior's entry frame, and the executable's entry frame, they both cause GDB to terminate the backtrace, and skip placing the entry breakpoint. - Rebased and retested. In v8: - Fix for an ARM issue that Linaro CI found. Strip the THUMB bit from 'objdump -f' entry pc value before comparing it to addresses read from the $pc register inside GDB. In v7: - Addressed Simon's feedback for patch #2. Changes are all minor, and this patch now has Simon's Approved-By tag. - While addressing feedback on patch #3 I realised that the approach taken wouldn't work. Simon pointed out that setting the frame stop reason was incorrect, but removing that ended up triggering some assertion failures. As a result I had to take a different approach with this patch. This is the patch that changed the most. - Commit message for patch #4 is updated after changes to patch #3. - Some improvements to testing in both #2 and #3. All pretty minor though. - Rebased to HEAD of master branch and retested. In v6: - More adjustments to the test in patch #2 to address issues the Linaro CI testing highlighted. Nothing serious, just minor tweaks to some patterns to handle different output patterns. - Rebased to HEAD. In v5: - Update to test in patch #2 to allow the test to work on machines that build PIE by default. I actually extended the test to build both PIE and non-PIE executables, and test with both. In v4: - Rebase to current HEAD of master. - In patch #2, added a supports_process_entry_point proc as suggested by Pedro, and make use of this in the new test. Updates to address review comments from v2 series: - Doc updates based on Eli's feedback. - Patch #2: + Avoid swallowing Ctrl-C in try/catch. That whole try/catch block has been removed in v3, so problem sorted! + Rewrote entry address calculation as suggested by Pedro, now pulls all required information from the inferior. + Use 'objdump -f' rather than readelf to get the entry address in the test. + Added a helper proc for is_svr4_target, which includes a larger list of targets beyond just Linux. This is then used in the test. + Test updated to use -lbl flag in gdb_test_multiple. - Patch #3: + Use 'frame' rather than 'bt 1' + Loosen the test regexp after the 'starti' command, this should now work on Windows targets, or any target with multiple threads at startup. + Test updated to use -lbl in gdb_test_multiple. - In patch #3 the entry frame detection is moved from `frame_unwind_caller_frame` into `get_prev_frame_always`, I hope this will address Guinevere's concerns about having to add the additional entry frame detection in multiple locations. Guinevere also had some concerns about the naming of existing functions (i.e. not things added by me in this commit), I don't plan to make any naming changes to the get_prev_frame* functions in this series. - Patch #4 is new, this adds some caching to avoid repeatedly looking up the entry address. The new approach requires reading target memory, which can be expensive, especially on remote targets. --- Andrew Burgess (5): gdb: more 'const' in the multi-so-lib progspace code gdb: rename program_space::entry_point_address* functions gdb: introduce program_space::get_entry_point_info function gdb: allow 'until' to work in outermost frame gdb: cache program space entry point information gdb/NEWS | 7 + gdb/arc-tdep.c | 2 +- gdb/arch-utils.c | 2 +- gdb/doc/gdb.texinfo | 22 ++ gdb/frame.c | 96 +++---- gdb/infcall.c | 2 +- gdb/linux-tdep.c | 2 +- gdb/progspace.c | 113 +++++++- gdb/progspace.h | 74 ++++- gdb/solib-frv.c | 2 +- gdb/solib-svr4.c | 85 ++++++ gdb/solib-svr4.h | 1 + gdb/solib.h | 14 + gdb/testsuite/gdb.base/bt-after-starti.exp | 259 ++++++++++++++++++ gdb/testsuite/gdb.base/until-in-entry-frame.c | 22 ++ .../gdb.base/until-in-entry-frame.exp | 215 +++++++++++++++ gdb/testsuite/lib/gdb.exp | 39 +++ 17 files changed, 889 insertions(+), 68 deletions(-) create mode 100644 gdb/testsuite/gdb.base/bt-after-starti.exp create mode 100644 gdb/testsuite/gdb.base/until-in-entry-frame.c create mode 100644 gdb/testsuite/gdb.base/until-in-entry-frame.exp base-commit: aeed64b39aed57729f66ad51560d8964e8201e6e -- 2.25.4