From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8Wa6Kq57W2qsJhEAWB0awg (envelope-from ) for ; Sat, 18 Jul 2026 09:12: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=KPPW4D35; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 984B91E09E; Sat, 18 Jul 2026 09:12: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 [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 8166E1E099 for ; Sat, 18 Jul 2026 09:12:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 868F44BA23DD for ; Sat, 18 Jul 2026 13:12:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 868F44BA23DD 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=KPPW4D35 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 68F8A4BA5435 for ; Sat, 18 Jul 2026 13:11:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68F8A4BA5435 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 68F8A4BA5435 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=1784380297; cv=none; b=kLrQhuHAfkkeOy+Jz1o6QwVaSTs0BAiOFt3OTPKNpyXzbf58yf72s/mpRF0ubg48pn8LSN+WTFz+nSRA2mifudKyWsINsFSs76VlL3rPDIYKsjyjn8b/NRb0OXFl2FCsOP9Z3IQplagT84ZuAc2ZE/pr5es1/VOXePorGH8RRE4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784380297; c=relaxed/simple; bh=uHKiCrbRmLAUeFo6PGoNsG5t70PFxC4xIR65q3C3QM0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=OGW7s7ubXXnNOR88XYTKOKSVZ6VWIJMBrSdKbrgOLafiRmWTtu5bOicozCqQGhG8wS7L9pkvsybkzb7vwjQ2vKZIikf8gq4XR/pYzIakSQT829TOBf8VJ1mgwhwfHuRRYl+opKmHRqF77sUj0heIkYa8cNWdvO/3y3vemAF+06U= 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=KPPW4D35 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68F8A4BA5435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784380297; 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=YK+8Gip8/o1RWsjX3jQH8gfOitG8dEh6AyPCrgONUCo=; b=KPPW4D35WEg9Ap1X4e5m0TN8dh5a9CthIhWIYfJ2I7d+rXfsSMzY/EG/HNdScRoCoRdyvg 24mXgkn+RRTmPS/L2oGbEkZFmSnzx8rsbmCZJYvcvluWtynhxR4a49eco5LshD++GeTwyR 06Qxsqap4nSVq6iZi41IfIzdAiB9edE= 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-197-87xu8PUSNNe3XNS6kVz-fg-1; Sat, 18 Jul 2026 09:11:35 -0400 X-MC-Unique: 87xu8PUSNNe3XNS6kVz-fg-1 X-Mimecast-MFC-AGG-ID: 87xu8PUSNNe3XNS6kVz-fg_1784380294 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-472a798fc7cso4108988f8f.1 for ; Sat, 18 Jul 2026 06:11:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784380294; x=1784985094; 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=YK+8Gip8/o1RWsjX3jQH8gfOitG8dEh6AyPCrgONUCo=; b=YHm5AEgb9y9avclV7u4nXlah75gVgQDD2XM0nHLeVgoDgOFyhjSg21V+s+X12AZlYK SmZhJj4H5DZsnWWWuausDoTJ4krqJr0GqYoQ6W90ozOM1kMeSEzAycHH53jWLSQAJuCd R/1KBa8WeQDTllN5B1PYpGKiZuzWUtzzRhJ83c9dxlWiPrVuq6sbfgKm+EWKfoiU0Prw 3Ke+3qTso02FQxntnaJJ/lBSSLIgUrSZfVdse92GFJd9bGMdL8JDBhm/ItSr8vbSMSwY syGAGA5bsXlRyMYI5E8gHhgyHZDJr4vJg3Xj52Uk0AUl0hCeMW+G5xyfsKFaNdF+TMZ+ RwbA== X-Gm-Message-State: AOJu0Yza3vA/kEmD1+0lkaQyjc25MKW4rmCq6gqQfKQmxx2wFLNZlJk1 r//ol24vNoOtpdKSSRrqr02po9RrffZSD/Xa9bXF+bbuxNFhvhh58/mi551G0R2RN46s0p7Ka40 Up1CVHfhgAuCe3HzJ8psRSvkZKfQmGKxebGYPpJnVqW+uoBPaaK/2/xZ+ZckkFrFW8OK9mKur/o jtVrK4sIQj+usgIdNaoLhLzfZHnHt9XaO2iZ5T/uFu28kf74M= X-Gm-Gg: AfdE7cmIl6UngchJIHEXcTU1TYO12Fi6yBm14S0Z9s7C43jicf/d/qj3tx2BcF5aM/a 6MKFAYrHC08FkmR+WQJd3sYaXFOqgXtntvFNWe2rnfTyyvZUPDtbAT77dUtntHAeSkXO4t/kF+q 0ZSpD6kJH8S1RT/6PdA8J4y8K0DgDO54vHtEtZlhjXd8FxyIoG6vkJ6b7huUt4aQMoXjieTh2yk PNByXBrMIB1qZwtHCoERMoTEDWuiywNxueWyaxa0nRK/2/ZowwElaJk1GtrUpxv26XYCGVcQwtz CZ1PSWCcrovi4rhKx8zTFWiL17Brjonh01ocGdUQmIDd2gIJHJhF+LhxJEHeyMoDC/+8pz8C1A= = X-Received: by 2002:a05:6000:41dc:b0:474:d7a5:4b6d with SMTP id ffacd0b85a97d-47f6230d16cmr8588256f8f.21.1784380293936; Sat, 18 Jul 2026 06:11:33 -0700 (PDT) X-Received: by 2002:a05:6000:41dc:b0:474:d7a5:4b6d with SMTP id ffacd0b85a97d-47f6230d16cmr8588225f8f.21.1784380293448; Sat, 18 Jul 2026 06:11:33 -0700 (PDT) Received: from localhost ([109.144.221.116]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f6980582csm6528269f8f.13.2026.07.18.06.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2026 06:11:33 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv7 0/4] gdb: allow 'until' to work in outermost frame Date: Sat, 18 Jul 2026 14:11:23 +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: 3AecotL9Y_Xz2S2WayLEf09M7ej5GRlM3Hj96hkcYWw_1784380294 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 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 | 253 ++++++++++++++++++ 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, 844 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