From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0eZOEx1JPWrv+xcAWB0awg (envelope-from ) for ; Thu, 25 Jun 2026 11:28:29 -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=fTL7la7B; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4AC4D1E098; Thu, 25 Jun 2026 11:28:29 -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 CE1701E024 for ; Thu, 25 Jun 2026 11:28:28 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9687B4BA543C for ; Thu, 25 Jun 2026 15:28:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9687B4BA543C 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=fTL7la7B 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 97D9B4BA2E29 for ; Thu, 25 Jun 2026 15:28:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 97D9B4BA2E29 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 97D9B4BA2E29 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=1782401282; cv=none; b=omUlnoG2yLc2hyZldlCZQLOn1zx2htnKu2e8nnBlG8fiQcpI1lZvK23SdO+DMVN0yUSDKzf0nmm60yNMydWJmjXZUwDT5eSFNFGF1/Ged4b+7JogfwTshnZbwCyHaAC7rCmKduhlVXbbc0o65WPjkazFD42KH1RhaajkA7pSmFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782401282; c=relaxed/simple; bh=heZfAia05DWVBbmtUL0fOtJlGhAOO0Txs9VQPtQRxbU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=EYiF6O88q5+JLl84J04AReDDjdx/epluVcp4b7sy85hQdIu9rRzqUIoXw3ri+V4KRZWSjauYuAVON16kJta2x1ohOn7kVtGGiEf8kIr53EvaZqVet1r4sG/QK//kGNE6XvNA8EXkZS8hATZNXofDrPbp6QAzPaCLk5Ba8g1M3so= 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=fTL7la7B DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97D9B4BA2E29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782401282; 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=R1+Srduwz04308wmueafBpDO7QO8GsteUyyF6TxI8v8=; b=fTL7la7B7+mOOmOAOB2j/U0+3XczTnrlcQLxeU/06WqPOGrWhQO3X4uJ7hD3NuHlc9EXrr QrRZ/j/E66J3EaF/wprQWB/6HxJlhpMAsObbSAOCIHvkAHWxsgpKlI+Iy9DAt9cQ9B3W0Y HUfgQKepnrkdondWW90eefTltqzVNGU= 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-376-QIoIhruaPoazolR_H1iZAA-1; Thu, 25 Jun 2026 11:26:25 -0400 X-MC-Unique: QIoIhruaPoazolR_H1iZAA-1 X-Mimecast-MFC-AGG-ID: QIoIhruaPoazolR_H1iZAA_1782401184 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-4623bdcad2fso2121461f8f.0 for ; Thu, 25 Jun 2026 08:26:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782401184; x=1783005984; 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; bh=R1+Srduwz04308wmueafBpDO7QO8GsteUyyF6TxI8v8=; b=n6nA7VLyRvflqNjxkZ7OXYA7Cp3tTRTgor07OJmBJGBBNkeWgJhx/bcn47xv9Clv/Z 4KmdDyNCCMYW/uXGf7mfVfl1ASBkM+60xSjaMA8GlW0j9mom5UYrHyQqbNHY9W0hOj9M oqgTa+4j4d+L5yqgZIGBax323GFD7NE6j2DzIgHcSo0YyoXrWeRQzWW4XmJMRbkDkFMU IrKlBI4Tnj3sWX5Lz3llX54kOVt0okTVR3tSNF51YhIS2d5Q+UMrJvnUWHsZkcMCyXKv HiTmLBNXRsDWZXZvwkVAeXmplTIqmMPJzpkpOw70BBZI/aq74i6u2b6/H+v7upEhbqw6 ApHQ== X-Gm-Message-State: AOJu0Yz2at1cQcQWqKHMWb6YQXzRWpwIYd86IGVVk+SIiJXMFWu/PTIN fGcm1htNLknQuFRh1akgfaHhHTlDmbsH0BixnKdfNEwceTaQmk0oeXCCFCLXpj8ApvU2iTsQgXI +R5RUkIaSt3QQRLF121/6huE9hpFhmZ0jeOcF3Z24RAhslhto1oaxI+Fe9c5K/SHwkKlLHl1h1M 2kYLEC1TS4xlS5eqtQiT0rUxTuMS/CB/IX2swCOcGlqPZrXOA= X-Gm-Gg: AfdE7cnP3npPfkkX75bf121xPSiouTTjZYx+DtRYtrPE2lLqtoh//jDv/BXFPv00jhd MdDkf0skfXWjyzuTyfz7XEsuSkGMno+6AvZHrkR+QtprcOID6fy7bWuzJHP5R4hWVXVH4ahrkzb RBaUEBfwR72bWnZgkKWMPE38lspvh5mu2n6CgFtQYHMhRYLjBuJMMVekGAqpd0M2iFSQdM3ulae DEtJX8awFQkreKGxwQbeNwfn/ke0SWhjZjH1cme1BLM7625SGUidWcKcQfpUr2cccZnLOOdegFb yDxSak1u2s/gIrfaqdFBSTchJmJmf7UXqEqSJz9tmECEfRG+mC6KMU3oTxYK8j+/drMY5mMvUyX sEhkJqP6FByHqhwJwYnGWJz2kv5wFyg== X-Received: by 2002:a05:6000:4718:b0:463:d9:5b35 with SMTP id ffacd0b85a97d-46dc04610c4mr4881833f8f.1.1782401184369; Thu, 25 Jun 2026 08:26:24 -0700 (PDT) X-Received: by 2002:a05:6000:4718:b0:463:d9:5b35 with SMTP id ffacd0b85a97d-46dc04610c4mr4881737f8f.1.1782401183737; Thu, 25 Jun 2026 08:26:23 -0700 (PDT) Received: from localhost (19.81.93.209.dyn.plus.net. [209.93.81.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46c221d9371sm17821619f8f.21.2026.06.25.08.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 08:26:23 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess , Pedro Alves Subject: [PATCHv5 0/4] gdb: allow 'until' to work in outermost frame Date: Thu, 25 Jun 2026 16:26:17 +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: Wgdiuh6B90bVQWB-szYVdrSuivVQsLXhy0eG9TujX0A_1782401184 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 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 | 105 ++++++--- gdb/infcall.c | 2 +- gdb/linux-tdep.c | 2 +- gdb/progspace.c | 94 +++++++- gdb/progspace.h | 67 +++++- 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 | 215 ++++++++++++++++++ gdb/testsuite/gdb.base/until-in-entry-frame.c | 22 ++ .../gdb.base/until-in-entry-frame.exp | 162 +++++++++++++ gdb/testsuite/lib/gdb.exp | 39 ++++ 17 files changed, 796 insertions(+), 47 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: 5e59c8f6f695ea9acc6c07e5a555a95dd8d1a1f8 -- 2.25.4