| Message ID | cover.1787588386.git.aburgess@redhat.com |
|---|---|
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7D7334BA9039 for <patchwork@sourceware.org>; Mon, 24 Aug 2026 16:23:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D7334BA9039 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=R3H8bPhW X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 4EAA84BA2E30 for <gdb-patches@sourceware.org>; Mon, 24 Aug 2026 16:22:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4EAA84BA2E30 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 4EAA84BA2E30 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=1787588546; cv=none; b=gmq0+PSHsWFL7b8ZmhHTQIlSY9FAlO5o6KAR3x6+8u7gJapis1F0fg+Tqt9SOqZsEZI5zBNO8Jy02nMQTnq5ueR2rnB12VwDurtWjIScRtaz8dbK6YETvgaW2P3wkp91YD21X5sikFyzovCo+4ssbOawegIuZdMvgUD7YPeAeyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787588546; c=relaxed/simple; bh=STNdP1zMab3VOfp+H1cPgnd8xg6hpZzFELn1GVhXNiM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Gy+AJTbE3qi7D718dXMxiqyZh0n0Xf4yBG9w4TBO1cfuxAtrP+zaK+gGfpg2kHulHtLMABfHK2wNKfU4Gn5F+4Ma37KlwwVH9loOtMgH+D9jmcYvDEisB6CYYxrj8kyZrbbDEUj2t7GNA9TNJBQK5Z5Rq8w84AVc5mimOk6gqTM= 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=R3H8bPhW DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EAA84BA2E30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787588546; 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=HIOy8CpC7jBoHEoD6QafS5jAuAdh5Z7f+RSil8LIxxA=; b=R3H8bPhWzQwyVeSZleOtW/Klvns/oWjxbifLndS+3qpmh2eFAdf3rA8eqJhjTGdnuHhUy2 42wFCYbeJ+fuO63We8NBhyOcADOoUzI2zQMrLrr773hA1p2Puv4hYWejY81aiIgWX264VB Fs8FHSFXr80gwfYFqpG0ZzCinYRETEc= 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-1-xGco7mvJMSW7PDbabMgrDg-1; Mon, 24 Aug 2026 12:22:24 -0400 X-MC-Unique: xGco7mvJMSW7PDbabMgrDg-1 X-Mimecast-MFC-AGG-ID: xGco7mvJMSW7PDbabMgrDg_1787588543 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-482bf4da3d5so2171668f8f.1 for <gdb-patches@sourceware.org>; Mon, 24 Aug 2026 09:22:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787588543; x=1788193343; 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=HIOy8CpC7jBoHEoD6QafS5jAuAdh5Z7f+RSil8LIxxA=; b=gnA8ZvkAEXCDFdqku+ighUU9O+chg69AmfXKRgCZ/iNRMlaqzxwX+J5Rei7XU31Ltj z1ne9bNaRpLVhz3NSn7qYDTcSH2ZEAGDysS8OYqSFUlIBvgPvvOcfBkKrpNacnbC7HwT KTRkzJLOngsMcgy6bjTWBlqW4vW3DLRWkwIZhQn65TSFae5aJjvDUnX8N0JzGYIkygv6 XYznVaPy77GQZhlovUCHJVUz5SPr07slVFwdFVcHmJ2YchHgYchWL1yKJ3r+cpSudWmq 91bDYg7fG8BM1zRzShGO00NE+9r3QyT7yZoZ5rjiIpIhryEbG5A3ZJ9/2QsMPeepWaMa 6MTA== X-Gm-Message-State: AFuF++l4H3jFZ4VCxL/vtiQKjGs+RwKlvJTNHK7xFtfIq8BfORrFMhtA RvNoKARNOarM4G2Tpo3rZUvKh5YnWjhOJkjQNS0llM73MC6aGavkaiyCDO7AX3VrjnOOUleBwOK r6KuBPsr0o2OP57k4Q9bFE4oMQ6LzJjwfrmnHDNqMOcqmD7ElF6RKRHmobwBYxiSxdKa4hyQ7S4 /1P0WHgX1haqO40wVGn64TAIVMGsmMo//1WXXhM5KaoRjRpw8= X-Gm-Gg: AR+sD12A1zMy26gGOyqxW2IFJrZkZX+I321xOg72tonk/M6KSssguGClYRZHuS6gv2G Be2WjZ8Nq6Z+aLUcd9nBPSu+5uqp0D0TBYKpVw18RM37+0SfVKL7kWrN5cA9HTt9Y1E9qXFntAW 9M7jxZaBogtMLovHJt3BGLkfhDZXFedJTYMtelBNCYc0I/BRIFWQTu3Otsm39lSOhvyNIxqzWwu +nUs8Cii2C3Pmw4nHgpZHv26l+Se8hX/xgqlFg38AoUWIUk7ChnPiJ3RunzpAI81UXGOE6oaCGy s6MVHE4zQjmogoPH4lzFRjxTPZt9WnuCb3RraI/FIhHqIAs/7N4ARPU6cm8jBn7PU5RJ+SjSgnR sUjCGHLPkc7egtRzopxLm/sNv8bc= X-Received: by 2002:a5d:5e02:0:b0:481:3db1:a62f with SMTP id ffacd0b85a97d-482c814fe89mr24965590f8f.17.1787588543228; Mon, 24 Aug 2026 09:22:23 -0700 (PDT) X-Received: by 2002:a5d:5e02:0:b0:481:3db1:a62f with SMTP id ffacd0b85a97d-482c814fe89mr24965461f8f.17.1787588542717; Mon, 24 Aug 2026 09:22:22 -0700 (PDT) Received: from localhost (128.223.159.143.dyn.plus.net. [143.159.223.128]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482d4710ac5sm3233840f8f.32.2026.08.24.09.22.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2026 09:22:22 -0700 (PDT) From: Andrew Burgess <aburgess@redhat.com> To: gdb-patches@sourceware.org Cc: Simon Marchi <simon.marchi@efficios.com>, Andrew Burgess <aburgess@redhat.com> Subject: [PATCHv9 0/4] gdb: allow 'until' to work in outermost frame Date: Mon, 24 Aug 2026 17:22:15 +0100 Message-Id: <cover.1787588386.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <cover.1784541057.git.aburgess@redhat.com> References: <cover.1784541057.git.aburgess@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 6u9Swc21hk66QQxk46cbo4LGSZvjmar5pg5wLwdKW70_1787588543 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_PBL, SPF_HELO_PASS, SPF_NONE, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
gdb: allow 'until' to work in outermost frame
|
|
Message
Andrew Burgess
Aug. 24, 2026, 4:22 p.m. UTC
In v9:
- Rewrote patch #3 to address Simon's review feedback. There's no
longer a distinction made between the inferior's entry frame, and
the executable's entry frame, they both cause GDB to terminate the
backtrace, and skip placing the entry breakpoint.
- Rebased and retested.
In v8:
- Fix for an ARM issue that Linaro CI found. Strip the THUMB bit
from 'objdump -f' entry pc value before comparing it to addresses
read from the $pc register inside GDB.
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 | 96 +++----
gdb/infcall.c | 2 +-
gdb/linux-tdep.c | 2 +-
gdb/progspace.c | 105 ++++++-
gdb/progspace.h | 70 ++++-
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 | 259 ++++++++++++++++++
gdb/testsuite/gdb.base/until-in-entry-frame.c | 22 ++
.../gdb.base/until-in-entry-frame.exp | 215 +++++++++++++++
gdb/testsuite/lib/gdb.exp | 39 +++
17 files changed, 879 insertions(+), 66 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: afa6db16e6508d8ea269557085bc7c301e824382