From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Ca0zMFtkOmqJvhQAWB0awg (envelope-from ) for ; Tue, 23 Jun 2026 06:47:55 -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=iB5++03/; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B69C31E098; Tue, 23 Jun 2026 06:47:55 -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 E76A51E024 for ; Tue, 23 Jun 2026 06:47:54 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AAD694BA2E0A for ; Tue, 23 Jun 2026 10:47:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAD694BA2E0A 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=iB5++03/ 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 809634BA2E13 for ; Tue, 23 Jun 2026 10:47:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 809634BA2E13 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 809634BA2E13 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=1782211643; cv=none; b=LXMelgLno476wIodHi4BIfn2BETcarTjy6GIOhrLgwoJN2T2TcbUs9qPAKatEsRoAhtyngBcPSt18Z+a+oJsHVqIRI7zHU2J0idLNu+rU8aDZEo60myfguU8mxXoyR10kgW6RWs5SfViAn77ofx3wHNbHY20DqXlUkPutZS45qE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782211643; c=relaxed/simple; bh=2BszZTcL9BWslQ1LQMow7tf+TpBZ/qivUKfxfjkKXyw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=gX1YY91VIr42SH5/WVe2YwHPpgGH9ua9uATF2Mlmaw+c7PlZofrjKCQswR23FCByi0QoZELYmXrTLmFwqdSO8Ca27ezmC6ibyZ2INHjKiFVCW7KFaRh+YgKrgyh8yCDDRJ3SXk6UoDyaNchGMnFcFNoIPWs7fIrtdz3X/0UEgpU= 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=iB5++03/ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 809634BA2E13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782211643; 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=9iD/FsbcEu/C/ZW2bchG648RXD1m/piWcsUN89BVQEo=; b=iB5++03/cXWNUWk4T5bYgzl7HXuUNac6zCewWVQdsYR80GK+JdHVE7xvzNMyeyUeA6V26a Kj2VfAtRiLrjjuIPYNG3vfElhPoUAt03UpZMc/nfyUVE9NtvMRBHU/5EqqYqCt5S1mclbw FGRqCbtivKm+dNaf7kBEOJ7hLQh1LD4= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-541-hehtobUINDqpjV4Qhh182A-1; Tue, 23 Jun 2026 06:47:21 -0400 X-MC-Unique: hehtobUINDqpjV4Qhh182A-1 X-Mimecast-MFC-AGG-ID: hehtobUINDqpjV4Qhh182A_1782211640 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-464f7476bfeso3672640f8f.0 for ; Tue, 23 Jun 2026 03:47:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782211640; x=1782816440; 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=9iD/FsbcEu/C/ZW2bchG648RXD1m/piWcsUN89BVQEo=; b=YEFsPurvVlm1t3aPVhla37p9YR+AB4nmClxi875kGtxnzazC39vzXQEk9IJC02h2uC +2SqxkMU+FHYTIgzm0XwalKWZKG/QaeAsbJu2JXwYyVYN1G14vomJ3i8udy7/+1PtvWi aAf26HPvo2b6KMo4adzWhO4E50CshwKeGgDcwyzfZNEIE1VPn8M9idQhLBoCOeyv3uDx 2p0Wr/syQ3gs5R/NhyJb82D/zYS/ZtVp3sopj7AU4+W2sfFdeVrJ7EOra/m2ZwrEEiXa aZb7ltPyHvcagDLLNhYVQr1jIAlmfSIG1gydafBVOSUb3OxR4kBmSGk+5+wVPzMFqHcE fD9w== X-Gm-Message-State: AOJu0YyPTZdNU3uOva27x0r+iBcF5gtaF0Z2BzvOeYL5SP9YN0dXpekp gpOOOKCqFUblyu3NxLc8+Wh+zyFEsCXtlK/O82MDs+UK3x+4KDkL0J4tNdhTOPGQ52i6quuMv2N mDUbIjUap8wwjda3aukHwAymOvtWojCwC7pqVhQSjpgOhphmUDYooftP+VZsrWEdHjPsBmM6QEd Z7J3rsgFh+TPs2akcqcfPDRas/XYuCFnys9LtqVgC3Xa4hU3I= X-Gm-Gg: AfdE7cmCmEChLcEhtR4rGrstnk797SSILeYeTF3pwZziwDXZx03ZjnzgNC9Iz6lPPbo jaZfA1hYNNNdima951n9hB/2rNmYfcsn5hJ+O7K+HBkSikWSJrYkC3By4qViX5sPpzCY5DvudPL vIlvqykCwiDf70BsUPLYsmhihhuSpV9K16fw19A2iW3rXGame3yEuudAz34plpWcY4h7cFp93rz N5xwA4L+XuiojB8gD8ZnWAsYD0sCDbaeYtjoigk5vOVX/N3vUdk5TJBClQ8f+ijpm64L9QoE8dw UY+gnlIP2FnbjZAzpBZ7SYOFQcKKrM7D9yqgiHXhVnkRCwdI+XeEWwyQw3VNv/oNJ7uiyXtBURL qUOXO0Rf0uqJzxVmly/kp5nbjftP9oA== X-Received: by 2002:a5d:4585:0:b0:45e:eec6:5020 with SMTP id ffacd0b85a97d-46add843113mr2899644f8f.38.1782211640338; Tue, 23 Jun 2026 03:47:20 -0700 (PDT) X-Received: by 2002:a5d:4585:0:b0:45e:eec6:5020 with SMTP id ffacd0b85a97d-46add843113mr2899588f8f.38.1782211639682; Tue, 23 Jun 2026 03:47:19 -0700 (PDT) Received: from localhost (19.81.93.209.dyn.plus.net. [209.93.81.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46666c579dfsm34925372f8f.31.2026.06.23.03.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2026 03:47:19 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess , Pedro Alves Subject: [PATCHv4 0/4] gdb: allow 'until' to work in outermost frame Date: Tue, 23 Jun 2026 11:47:12 +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: wIasOEDJD5_88bki5wHI6LCcRFq1fQgoV9LmpSX8rys_1782211640 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 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 | 168 ++++++++++++++++++ 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, 749 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: 717ef05c9c6d5f7a07540df2e79853d04b56f750 -- 2.25.4