From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bOveFvXvXWqP6RkAWB0awg (envelope-from ) for ; Mon, 20 Jul 2026 05:52: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=fMbVV7HJ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3923B1E099; Mon, 20 Jul 2026 05:52: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 [38.145.34.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 D41FB1E099 for ; Mon, 20 Jul 2026 05:52:51 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1C73C4BA79B4 for ; Mon, 20 Jul 2026 09:52:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C73C4BA79B4 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=fMbVV7HJ Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 3F3694BA2E13 for ; Mon, 20 Jul 2026 09:52:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3F3694BA2E13 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 3F3694BA2E13 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784541146; cv=none; b=Z7WnmjIFhXAGodSpy069qXGH8ebkIOH+328UZwl0xRNpWqcYPz3+AqTZMR28vIO/ex+CWsIdf0Xq/CqnuGHRH0vHojhJmL8uu9Vurgz3tKD07I2wP+CHT+7JNufuOr6J4B/8mZkVCNxjXwj8+2YdQXuldwX+Yuqh3YgR5WvDrd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784541146; c=relaxed/simple; bh=BH4aq2UHtkL495c//tFFdKFzaVkSWXhCxoXwtRueikk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=jcy7QqhrUPh+WNevNnYlK+BkOi+HWCvZdiz8Owhz4ghfEGdWFs/7bybb7KKNeD/iQR09y40Nsay9LLOlsugfi54fyZTES7Xh7AB2tzZVKAyNu6+vOw/93ZV1AbSg1Fr/EIM2nYITYZ7doj1vkXtUGKOFm50YL3OuZTTvfvf2tEc= 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=fMbVV7HJ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F3694BA2E13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784541145; 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=Yg4PxutLWQMI9zTPw3intwQVfESAqq7/Iz31HTLvCiw=; b=fMbVV7HJ5zZX7keRPKQMdvSl7e86EfatBk9gLyBCJrj5yvPng4WoJBwyylzp5KfDEHr2jl PvDSJZ9Y9IQQPX5KLdxXJBRxP5Sofv3jVU9Cb0OgddQAD625Pp9ILWPDBUi0Bor+fMjf1N y95emrRXdLnvFHxUCGotf4BlwFAItfc= 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-396-ks6F-PiDMMKZ6L5gBIg6CQ-1; Mon, 20 Jul 2026 05:52:25 -0400 X-MC-Unique: ks6F-PiDMMKZ6L5gBIg6CQ-1 X-Mimecast-MFC-AGG-ID: ks6F-PiDMMKZ6L5gBIg6CQ_1784541144 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-47f24a50f0cso8830784f8f.3 for ; Mon, 20 Jul 2026 02:52:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784541144; x=1785145944; 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=Yg4PxutLWQMI9zTPw3intwQVfESAqq7/Iz31HTLvCiw=; b=RIFNag7lPWg8o8PfrHn4fkdSHG5fv/EKzgKrxnL5XVe9wyjxGoCm1otf/xq5MWy750 SrQuo48oZz+uDtuAYXOb5X4Xd3tAX/rrvYiNjFYUPnhcAj1o3a0H1fRVhID9r480m8+J C1/nlPr+oY6sSjVTdbPTl9dhazy6mayN5EZUvY+A4KU0cNpfKJ0QyYbn+5zDPZHEr6cI K8F4FbXzA4b+KIKNSku7O40Hc86UKxcgvVjX9hgujoMGrS6zxK86F3r9K8e3Mql4sZ0Y jFagq8Ji+yxQchNPcmIkT41Dq9ew7NrDBMZg86dMby9NxqS2uYYEia+9sGTyk4LQoFS0 D65g== X-Gm-Message-State: AOJu0YzqpLO+4YMSiX7hnZO55hDOZ59zQKay+gXQvNt+OnQlBraO32m4 9amS8CUuLeti0+rpD9D/f5PdroPgI0vl2AkDE4UReHAaAZb4WxRbRgO7u1SWUYk9wA5lnKdv2gE JF9FKgAJ5ft4ZhOHr1CKuBfk0Jf6cXOS4m8o9H5wskvYjjXIRK9L7/WpN1sUjp4lVi4fzt5s+zV pvKAKjmAo/hk9EMlCP1QyvxjpGQre99Kq0KtmvR4zXbKuvFWY= X-Gm-Gg: AfdE7cniAPPRM09MWkoJzj4Z5T3NPynZuam41F2Q/fAhd8FVU/T6qcyOTScMQV1SiBB uZFyVrnAh+wvM5M3Ty4K5+oCJXqkeDBYsJAIUxBX+vHi8sGlN5je8wsJ6url5iCCbbT+PepXBtu n6dUJ7BiMfotA+H2wAh4sTbxcEEFG2gKngn3NcECh3Ci0qsfD2Kg/ne0NCQnY9wbi1yfpKV6fsH NHZcn1iYbxVj5lHX6JtWq2+hc5vI5DP/kSMTXk8LbZKuJlOmBNIUOtvBEyqJSu6cONJm+JlzC3C AnyaGxw51gtHCXCSxBAqCr3QgTLeRwhux8kn4Manj5pQjtTKSm4pZqki+X+LEqugzqChhp+3 X-Received: by 2002:a05:6000:25f7:b0:47f:4fbf:7b21 with SMTP id ffacd0b85a97d-47f622fcd69mr15841732f8f.12.1784541143648; Mon, 20 Jul 2026 02:52:23 -0700 (PDT) X-Received: by 2002:a05:6000:25f7:b0:47f:4fbf:7b21 with SMTP id ffacd0b85a97d-47f622fcd69mr15841688f8f.12.1784541143050; Mon, 20 Jul 2026 02:52:23 -0700 (PDT) Received: from localhost ([31.111.209.233]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63edcd13sm27900732f8f.26.2026.07.20.02.52.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 02:52:22 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv8 0/4] gdb: allow 'until' to work in outermost frame Date: Mon, 20 Jul 2026 10:52:16 +0100 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: vm4tsAd2Lk17DJRUmP7W5_LFbOCEt2K-YubP4ge8ONM_1784541144 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 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 (4): 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 | 74 ++++- gdb/infcall.c | 2 +- gdb/linux-tdep.c | 2 +- gdb/progspace.c | 105 ++++++- gdb/progspace.h | 68 ++++- 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 | 173 ++++++++++++ gdb/testsuite/lib/gdb.exp | 39 +++ 17 files changed, 850 insertions(+), 29 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: ca8bf5f5dd69eba877e74ca8bc0796388070401f -- 2.25.4