From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ASIDN7YAUWpD0QEAWB0awg (envelope-from ) for ; Fri, 10 Jul 2026 10:24:54 -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=CLaHknmp; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D40221E070; Fri, 10 Jul 2026 10:24:54 -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 4F2D91E070 for ; Fri, 10 Jul 2026 10:24:54 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DE7C4BA23E4 for ; Fri, 10 Jul 2026 14:24:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DE7C4BA23E4 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=CLaHknmp 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 A717A4BA2E15 for ; Fri, 10 Jul 2026 14:24:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A717A4BA2E15 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 A717A4BA2E15 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=1783693455; cv=none; b=IEeQOv9wJ4NetalGZvUQ/M8CCpOMYDGS8UKFne5c0vuVY+Nl3MCPsQWPftbBKCe3J4IW+7o2xL9cWsMA47Smz3gX9JvQtoY8XK7yXsezn57UwFz+bsnGgglFRsffpPE/ysB5+oozINAxlCOBK6aeyKOGqdyHKMNksDvK5F7kETk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783693455; c=relaxed/simple; bh=ZOJHnEcNWgl2R6P3WFGVSDYTaQ+CPMDC5a9ScnH89dI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=bJlf7YRwGb3XH0BmcFK71mpGLu8xNEyyXyBEXbFDFuIa2KcaNkodFTOaj8Rkhu/aHOp6GNUy+eco5f5R7z1s9mRduk10IHxESxhrw5wXij/afZ4hHimGPGSrgBe/hrHTktdbYMhTf7mf5CqJQpqdVSRX8M2knLJCrAdPDK0KE7A= 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=CLaHknmp DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A717A4BA2E15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783693455; 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=gFd85AuK0NsbrmGSp/yJ8VGZdkeN9Z5sSAgdjfARhZE=; b=CLaHknmpkPZ0mkYxG3RrqjtME6NDtNxzGzjTr56Xmcjsibro6dCETAnrAMg3GSDCfMVo9s DlFTTZ0HrReNT0z/TgDTOTtzR9GgXLaLjYxeVX9TFbr/HayloLaqhDPAz84vXsj9Pjp16d f1Su3Kc2dz6bIOQbmvJj5ySR10YGR30= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-104-p8oE4lszOUmPY-RWUdtfIw-1; Fri, 10 Jul 2026 10:24:14 -0400 X-MC-Unique: p8oE4lszOUmPY-RWUdtfIw-1 X-Mimecast-MFC-AGG-ID: p8oE4lszOUmPY-RWUdtfIw_1783693453 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-493e94719e7so6062325e9.0 for ; Fri, 10 Jul 2026 07:24:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783693453; x=1784298253; 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=gFd85AuK0NsbrmGSp/yJ8VGZdkeN9Z5sSAgdjfARhZE=; b=O/dp65eOg0izvbDT08z/k37aSJ5Sc5fBY4bN/5pGO1N1N9nJ3wKPdAAF9S8DiaRuPO 0syRnBwtJ+BGPmVoZV3VB9DQoG6EzQ86sJGbq/fwhxHFW+8hG31h/kHdtoOebCQHrO8r IGlviX4zd9g9y5qg/h1UfEGwNX6GDPAePydXuCXNSFfm/VBl6ZbVmAg7CK9JerwCyop4 Nvze59PeZEeCfEjTcm85oPhODtB+vybk8cIyLMqfLLemkwcL1Wmf+7wCxGgaOaYdleNS 4/R3ncXnjIPScd0Hn1GEK/9tJazQt4MjTSqFvltU5BnOpduAxepprfoBg/rxrwveRlW/ W+LA== X-Gm-Message-State: AOJu0YzXSZYzAM8+lqb6+cF3KgNI9kMQM/DEojkgp0q+m2Hr2BRT/5kl oLpyp87Agz0zve0eg36J09t4g/VGgJlIHa8rR2lMnlKWDe5N4JongeVBklJbAUB2Uz7siveKyu3 4oGB7/0UOZ0dIRKiRJlvL8uFveHTvleipER9ywtLqQy3crMuHs+EX8EEuBqoSGSBdcJbkN/rVsu gHSH+EAOgy5YRYZQeawmo3AfS0Mwzua0A3bK7HyMNMdez9nCE= X-Gm-Gg: AfdE7ckBg0zRNCMYK3JEoNXppSvhFk3bzMu8eq79QPhV50+scB7tyqB8M4dPmN+OguK EVEqQyZTEOBjsjAUh7CDqxi7MDDXMXLhpnyWpVQd26eu2g/y7S/IZaXWp/Gm8OKSUkVl2RUrrck lLyKnU/Vd70++7s6RCdIjqFv3jAozClv+j23pUiPSqzpG3PTD1VEIO3U4T3V4EE6MHmJI5Jm1lE /Afh7gdUQ2tXDXvarcS6MalV48y0gLoG8sWz/PTn7ie0DRQIkdHQ3TGEm0mKuaKwVbmBPCEUXyp Vlfor6D5M3hsaAdQEHDWH81/JMPxETjxvOCDiz+YDRr5VFfn8IaHBkYWwursY3lDA0OEZDvDCOB nOv5GRN8= X-Received: by 2002:a05:600c:3acd:b0:493:be3e:cc3 with SMTP id 5b1f17b1804b1-493e68c8058mr107494335e9.21.1783693452748; Fri, 10 Jul 2026 07:24:12 -0700 (PDT) X-Received: by 2002:a05:600c:3acd:b0:493:be3e:cc3 with SMTP id 5b1f17b1804b1-493e68c8058mr107493855e9.21.1783693451784; Fri, 10 Jul 2026 07:24:11 -0700 (PDT) Received: from localhost ([31.111.209.233]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493eb6e8844sm157446945e9.10.2026.07.10.07.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 07:24:11 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv6 0/4] gdb: allow 'until' to work in outermost frame Date: Fri, 10 Jul 2026 15:24:05 +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: k_Zx6Orq50z7JW5-Pb1SfwiohWlpbp4Lzhf7EEM5YUs_1783693453 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 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 | 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 | 166 ++++++++++++++ gdb/testsuite/lib/gdb.exp | 39 ++++ 17 files changed, 800 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: 32a7e94f84a3df0bcd08a2835e2c316f5ed07f77 -- 2.25.4