From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EeQ2EX6oMWrBzAoAWB0awg (envelope-from ) for ; Tue, 16 Jun 2026 15:48:14 -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=aDMQB5Qt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 40CF71E098; Tue, 16 Jun 2026 15:48:14 -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 BFAE01E070 for ; Tue, 16 Jun 2026 15:48:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6444948F6668 for ; Tue, 16 Jun 2026 19:48:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6444948F6668 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=aDMQB5Qt 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 E850B48A0810 for ; Tue, 16 Jun 2026 19:47:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E850B48A0810 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 E850B48A0810 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=1781639245; cv=none; b=WsnvEB7/goLIWOL7V42Ww5oHKlgtGM+yXogeqBSXtBhfxgK5T6HyM/DJGEW9rgr8z128gH7b/u9bU817zePwqfsBZa2UXxim8KLLsnqdwYRvSZqGieS+1/bLWf5T2Y5YpaAJIikU54bsratM0dFsgXEsVPhFB03QWg6mzDWZAj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781639245; c=relaxed/simple; bh=9Eg7caDKNJ8niKH5of4Tz1oKZ5Z7HU86VNq2iAME6sE=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=uueSIwr+g3etB8y3A+m4pRUV2ep1/uXiQLXSoimm6bCecL14wP/ubx6vBVG5jvRD8DsLc6N0ZZkiw9bZ6v9ws3SbhxNKIEGmNvuoLi1v3EuSA63N9M3U0dfYcJlQzPMOboglIt0wg3N0f+GEeKlV0u3JqqQWPESstj18WlUkTzA= 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=aDMQB5Qt DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E850B48A0810 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781639244; 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=QjA+PImcCGD9wAl7MMrYtquYLwXf3tlmERq7bfjZhh8=; b=aDMQB5QttKNKka3RxzgpY6cezRhBB7B2S3uzT6UFMp1oJxYcKxrck3msl3i8yK+CMid+fs 6jK+TzCREucNaU9CFB6VLZFMxCjMbNc54TByH3+JdEsisEP9W4kKjKHnslyP1TMNec+tQK nJaMx7X4nU9AcnBhfa+yyRDvOfWgc5s= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-fo5K_F66MsOsrgujh2Jikw-1; Tue, 16 Jun 2026 15:47:23 -0400 X-MC-Unique: fo5K_F66MsOsrgujh2Jikw-1 X-Mimecast-MFC-AGG-ID: fo5K_F66MsOsrgujh2Jikw_1781639242 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-45efa2f7009so3405594f8f.3 for ; Tue, 16 Jun 2026 12:47:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781639242; x=1782244042; 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=QjA+PImcCGD9wAl7MMrYtquYLwXf3tlmERq7bfjZhh8=; b=VZaDgERXZg/2Uyhzo4wxNOA59XJ5uvFaWZV3BBVT29K7lrR6pFVTmRKGi5Y8R1FvAK gsQPGmgK412HDJqulHbI6QnJO7K39tJPhEtYMZb5Vpu9a4ER3EZu5cYnSxbmo7jRHDlE MRV0JBWp5KFdA6mFpk+j9buavU0sSixU/PK2XQNQ1reRYmS4+rTo3DHFv02R5yXWsZUU +wZEdEhm8jb5iEmRIk22kNq8zx/UeMu20kQuC9c/y98B0I9HmYe1ObvEuVdCevRlw7Vv ZhDFXL4blOlWipWjVOeCXivhu9uIbPQpTdvB3xNpvngaLnog7pQlupHPUIZwBFd5Eybp 70pw== X-Gm-Message-State: AOJu0YxZN1+51dzP5EMWy2ieBu7VFydE/SEozA95OkW7ysPVmSh/oi7T ly2nbMrky1B3gwKvK73uEFMwcWQRp2+BkhfDnSOKo41DvpD9J6HbhY8D1bPBvn0Y0/x0Lz1HCnp h95tJP+zsOMHqpDnmDicZcp4z080xBQ9e/SrAqJvOH72+jBhwlNNA0YU60rT7cfWWDDPDjTwMSl NsD11RP2UyYKfATSUjg8uXihkTKGgwWuVwJkhmOvWq9EvxGGY= X-Gm-Gg: Acq92OFiiC2MmnZPFxaYOpgHaEcY4QJrZ1FiiJDEBuPus8dR6q46HslE2W6vcArH2cw 0Ge8jLJcFQRcaxzdwHS2uNChe8xmBSkpSvyysTZxgK5wiQiL913/4GRcc7UNHftrV6RmVU9u6VX Bwlx5kR+CPoze8eCf+FeF+gHLAvV/4WL/b7gxLE7o4Kr+K93bP1fY2IJ5dkMXNWPnSCVwzIgEpu s9HVvcLVu9NA06sWiUo41ZKhnWVefJu/01hp9bE4Sgs4tHraj6saBL8Nz4f5T6OZK68P7umxvC0 28mQ0p1MRIvC2wnKtGMYcqFfU/wnHoBqhdxwhzDZJAfMofUUsTUXn5gOVTmVPpupnOFOsHAMCMY aOjt+s+q8eQUrZKZPJBmOuu4VdYv8s5XryhLOVewZ7g0= X-Received: by 2002:a05:600c:a148:b0:490:44eb:c1ec with SMTP id 5b1f17b1804b1-492333dafe8mr11765695e9.27.1781639242024; Tue, 16 Jun 2026 12:47:22 -0700 (PDT) X-Received: by 2002:a05:600c:a148:b0:490:44eb:c1ec with SMTP id 5b1f17b1804b1-492333dafe8mr11765425e9.27.1781639241559; Tue, 16 Jun 2026 12:47:21 -0700 (PDT) Received: from localhost (92.40.184.41.threembb.co.uk. [92.40.184.41]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa3abd0sm115440625e9.1.2026.06.16.12.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 12:47:21 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Guinevere Larsen , Pedro Alves , Andrew Burgess Subject: [PATCHv3 0/4] gdb: allow 'until' to work in outermost frame Date: Tue, 16 Jun 2026 20:47:13 +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: cfNgfXPjrig2DgF32TH19GvQEDV_nZfjq_u6ftawfe4_1781639242 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 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 | 167 ++++++++++++++++++ gdb/testsuite/gdb.base/until-in-entry-frame.c | 22 +++ .../gdb.base/until-in-entry-frame.exp | 162 +++++++++++++++++ gdb/testsuite/lib/gdb.exp | 8 + 17 files changed, 717 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: c311f4d37f31ff3fbb5db6923abcdf93bb75a37b -- 2.25.4