From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yd3HI1aHqWlhjxYAWB0awg (envelope-from ) for ; Thu, 05 Mar 2026 08:38:30 -0500 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=TKUCEvTY; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 88C2C1E0DD; Thu, 05 Mar 2026 08:38:30 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED 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 BD90C1E089 for ; Thu, 05 Mar 2026 08:38:29 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 530794BA23FC for ; Thu, 5 Mar 2026 13:38:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 530794BA23FC 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=TKUCEvTY 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 B63164BA2E0B for ; Thu, 5 Mar 2026 13:37:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B63164BA2E0B 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 B63164BA2E0B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772717845; cv=none; b=noTI+feZUwVgvEm6h5+25wzpliJthXi7tvBQ7Pvfl32JNC9sLwiK+cK6GnGO3mRMkzekQjZh3xQEDo7XKHHCn4kGE7QiP4p/oJmnK1wXG1DNwnAWNDEGRRxd0NzH9QUV7jV4yuQZ8hfe7tDY+cV8VE3pNoIb/Qq7ol2LrZNwiLw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772717845; c=relaxed/simple; bh=GXeWroyiajaXu1x/iIeNLz/C8Xdtm+G/Z6fBRrQZMjw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Tf+EifYugr/DsH5Q27MfRaWA9UJCrpprg4fuTPYF+4hogcCcPrum3oHUY9o7nv/hAb72mADvR3HEOA9t82n7vdisyyUZV/rk2hROk0Mhl/PH2vmArGywseFozmMlTw7/iJBQH6Bhqw6AS89erXFwhOu/Goh7wpsfjWn/bO+0QN8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B63164BA2E0B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772717845; 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=EoKQ/ioq2zsRSvEep0nv9YSkq5AIEsigr0C4TlOQMpc=; b=TKUCEvTYHGY7KxlUd4NQUgtLAYpFW9EOn7yPulgze5THJUn/dybcRonfayW/NZByAxtX6J tj4pPSUCfefwUOAErUQLN839sBChFNhrCG0zm/LEa6uAO39HaSOml4mmZN3QaUG8s9ijuS Bd6cJTD/oiBKxz9bt1Ix32EPQuQaVRo= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-93-Q9xi41VjPkCHGJI40SCjlQ-1; Thu, 05 Mar 2026 08:37:24 -0500 X-MC-Unique: Q9xi41VjPkCHGJI40SCjlQ-1 X-Mimecast-MFC-AGG-ID: Q9xi41VjPkCHGJI40SCjlQ_1772717843 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-439c5f65688so1673474f8f.1 for ; Thu, 05 Mar 2026 05:37:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772717843; x=1773322643; 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=EoKQ/ioq2zsRSvEep0nv9YSkq5AIEsigr0C4TlOQMpc=; b=JrDPn0JVdFzadDQ7EndOu33d2tri2meDnYM/yQ2ncTBiixm1mOlGBwR4NE4lnomJKE P/LW5sPMPrThzgjPKZZNqwGqwwWRHA03RQhJZBQ5tZZJkFyozGggnNp0URk15kvIm2eD VoPsyKM5+n2eUAH5F3cxKLiwBja6047ujBNOzm9ah+WNQ/9jHK8cW1nwh3pwkZ8GORlu VSAnNsHO7MsOhgOq66FslsTyn3VzfDfZbMNOu9PtG0Q6Hnms6dOL8eTM7ZPySXJoqm98 1jiZ+NKaERxCRdnFGSepx4/CL+AodHQ2q8mDRx46G2X1YW8fRjHgoThGwDjlgxVS9xJs lbKA== X-Gm-Message-State: AOJu0Yxi09Kb39u6lYYcCfmz/eDobR66RmLE/mUr8IdUWh3Bpzm96C+o nFCiJXUmjl50fELvfRTPFElc/oKk9FqxBYd4tjmH8qXqW7B92Kf/oBHpqHiK3nE/t1lwaSwsh4d jdQiVqV1XCAl2EGnbuptkaXmh1kri24JI5Fg3JczALOl2AuFzyyS8GocuBAWXqmu1zv0Yse5eO9 0Fq31SiqEjjP8qbEto9u4GmZeF0mxHIEicRvBZFyDShN5UBEY= X-Gm-Gg: ATEYQzyy+TSGvxtT7IuEngPIrlli2FnkNuI9E91yPha6o2wbzf6j3f4IqIWlBaoaG8s 2kzFx8t0pxRNUAUUmv9tkPRFEtjSpcr0aEX1uXCan6zHLEx9FYPBrRg+OMuPQyZV0QckrEBsca+ pUTc1p2f7ijUcQQ5hv2Wu5w8LAkhXg80S/7HvAbFk5i5NaOtKwnju1H39sIqmMl0+s8dtfpSN5Q lT8YdFX5w1ImSs40ZeR54VhkX3+uqFDn4f42c4pc+spaithA0+lA4loGKRjHWxzXU2rKhMd/bkq LlC2GoK4nzdBkhNzy23ab6f21M0gPDXP6myljJFPn5tXhk3XkBgf6ULM/V59JFzYOoMjskVrqHJ gO2IGmsv35I+tjjCg X-Received: by 2002:a05:6000:2382:b0:439:be3e:52fe with SMTP id ffacd0b85a97d-439c7f8f3famr11356705f8f.26.1772717842731; Thu, 05 Mar 2026 05:37:22 -0800 (PST) X-Received: by 2002:a05:6000:2382:b0:439:be3e:52fe with SMTP id ffacd0b85a97d-439c7f8f3famr11356649f8f.26.1772717842233; Thu, 05 Mar 2026 05:37:22 -0800 (PST) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439b55d15besm37969909f8f.30.2026.03.05.05.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 05:37:21 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 0/4] Fixes for tail call, until, and FinishBreakpoints Date: Thu, 5 Mar 2026 13:37:14 +0000 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: nOaBSNhIZI81F_GqvYmf3Gd4O68hFlW0S9Ec5DZXNYI_1772717843 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 v2: - Rebased to current upstream HEAD. - Retested. I've been looking at places where we use get_frame_pc when we should be using get_frame_address_in_block to handle tail calls correctly. This got me looking at gdb.FinishBreakpoint, and I found a bunch of things that needed fixing. Thanks, Andrew --- Andrew Burgess (4): gdb: fix frame_unwind_caller_WHAT functions for inline and tail calls gdb/python: fix FinishBreakpoint.return_value for tail call functions gdb/python: don't allow FinishBreakpoints for inline frames gdb/python: fix gdb.FinishBreakpoint returning to a tail call frame gdb/doc/python.texi | 3 + gdb/frame.c | 35 +++-- gdb/python/py-finishbreakpoint.c | 17 +- gdb/testsuite/gdb.base/until-in-tailcall.c | 53 +++++++ gdb/testsuite/gdb.base/until-in-tailcall.exp | 108 +++++++++++++ .../gdb.python/py-finish-breakpoint-inline.c | 58 +++++++ .../py-finish-breakpoint-inline.exp | 147 ++++++++++++++++++ .../gdb.python/py-finish-breakpoint-inline.py | 27 ++++ .../py-finish-breakpoint-tailcall.c | 45 ++++++ .../py-finish-breakpoint-tailcall.exp | 118 ++++++++++++++ .../py-finish-breakpoint-tailcall.py | 27 ++++ 11 files changed, 623 insertions(+), 15 deletions(-) create mode 100644 gdb/testsuite/gdb.base/until-in-tailcall.c create mode 100644 gdb/testsuite/gdb.base/until-in-tailcall.exp create mode 100644 gdb/testsuite/gdb.python/py-finish-breakpoint-inline.c create mode 100644 gdb/testsuite/gdb.python/py-finish-breakpoint-inline.exp create mode 100644 gdb/testsuite/gdb.python/py-finish-breakpoint-inline.py create mode 100644 gdb/testsuite/gdb.python/py-finish-breakpoint-tailcall.c create mode 100644 gdb/testsuite/gdb.python/py-finish-breakpoint-tailcall.exp create mode 100644 gdb/testsuite/gdb.python/py-finish-breakpoint-tailcall.py base-commit: 030f56e0e82cd98f52a4afa468e6612d3454c57f -- 2.25.4