From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id A25373858C5E for ; Sun, 10 Dec 2023 22:30:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A25373858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A25373858C5E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702247429; cv=none; b=IZ+h3be7HwP+txGqHe8vXCSJZV3yCJk3mdA/IT9Mpk1QKYusBDpk+hZCBBwPn4ZRM+DkojHiaKrOnYcbN6IDdXNuooFyvIrd1HLZ+i9mZtKN7cQwd0NO0BJsAWOlGBs7gL6OaCbb/pzUUhv1CNhURNGXNixe54M6npS/mywfft4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702247429; c=relaxed/simple; bh=HMFvj08GO8ux3vss1nDmVk2TPqvilEVOTDmu/7IEjJU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qfO3jkGMXeAELUcVkdkOBlyoKxd9YuFWIH/uZO8k4nx4OlArX6bea1FRaEspqSdQZcxRVvYJMSRCpfeXq/CVsCvxi5puXlvBlwKXbIpy15GdZNkFj2scIXsg0u5XnJIWywIaLrN+XssxDCxoy+l4PItYIDanciZUs0yRjmNVA70= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6006a.ext.cloudfilter.net ([10.0.30.182]) by cmsmtp with ESMTPS id CME0r7bWdjtZ3CSJorP3qc; Sun, 10 Dec 2023 22:30:36 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id CSJfrYLH1GKIcCSJfrb7g7; Sun, 10 Dec 2023 22:30:27 +0000 X-Authority-Analysis: v=2.4 cv=E+beGIRl c=1 sm=1 tr=0 ts=65763c03 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=e2cXIFwxEfEA:10 a=Qbun_eYptAEA:10 a=CCpqsmhAAAAA:8 a=O4hal1pMFPggvAUmv-8A:9 a=ul9cdbp4aOFLsgKbc677:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=H+StBcwcVBA1Wk2Xw0DyLgaT7FBaFLb8/yRGwBwjFog=; b=KMf5/2Tx/Vc12bMxf7BxjC0Mu+ BBNySSM7KlN+hqnPr0Uj8QFeBJYVsezqXf+NuTLVPflQ+a5nkJ83xzOOogogdVoy7Fehc+hMgr+um SbzQTrqd6o5q5q1q+rRwysVSq; Received: from [198.59.47.65] (port=39410 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rCSJf-0010zI-0Z; Sun, 10 Dec 2023 15:30:27 -0700 From: Tom Tromey To: Andrey Turkin via Gdb Cc: Andrey Turkin Subject: Re: "previous frame inner to this frame" error when unwinding fibers References: X-Attribution: Tom Date: Sun, 10 Dec 2023 15:30:26 -0700 In-Reply-To: (Andrey Turkin via Gdb's message of "Fri, 8 Dec 2023 20:50:19 +0300") Message-ID: <874jgp7ksd.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 198.59.47.65 X-Source-L: No X-Exim-ID: 1rCSJf-0010zI-0Z X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (prentzel) [198.59.47.65]:39410 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfFM9hU+7+qw/3DhnhQE4p0Dr00Jo4YlkgdkUBbdm8j4OTmo8nDapU5e/fSsF3m4pe8qj/ApeDyFqFgi5SxHGcJBhRsqHWvFmAYwgoszU74k9NwQ3hjrF pR/OJ4w83dT9EtQtRO9YahdLuLs6Zg8fdrhh7OOlKT1pyY6rWSg+QZd8Yq/K/FYKScS2cN7Wfx/1lQ== X-Spam-Status: No, score=-3017.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Andrey" == Andrey Turkin via Gdb writes: Andrey> I'm trying to write a custom unwinder in Python to unwind through Andrey> boost coroutine (so, follow coroutine stack with its caller's stack). Andrey> It generally works pretty well except for occasional errors about the Andrey> inner frame. Obviously, coroutine switches stack so comparing frame Andrey> pointers makes no sense; so, when caller stack happens to be allocated Andrey> above coroutine's, the bogus error occurs. Andrey> I can see in gdb sources that it knows about gcc's split-stacks and Andrey> apparently arch-specific frames, however I found no way for the Andrey> unwinder to do anything about it. Is there any way to fix this error Andrey> with the current gdb, or do I need to patch the sources? You'll need to patch gdb. The current code for handling this sort of thing is totally ad hoc and can't be tweaked by the user or from Python. Letting Python unwinders affect this seems like a nice feature. Like maybe a method on gdb.UnwindInfo that sets a flag, then pipe this through to the check in get_prev_frame_always_1. Maybe some other way is better, I don't know. I'm definitely open to ideas and I think this is worth solving -- I feel it's been asked for before. Tom