From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28976 invoked by alias); 23 Apr 2018 13:28:26 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 28941 invoked by uid 89); 23 Apr 2018 13:28:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Apr 2018 13:28:23 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 573764270964; Mon, 23 Apr 2018 13:28:22 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15ED02166BAD; Mon, 23 Apr 2018 13:28:16 +0000 (UTC) Subject: Re: [Qemu-devel] [PATCH] scripts/qemugdb: support coroutine backtrace in coredumps To: Simon Marchi , Stefan Hajnoczi , Vladimir Sementsov-Ogievskiy References: <20180404103440.19546-1-stefanha@redhat.com> <008ac6e8-1e68-b0f6-7e75-77453721d031@virtuozzo.com> <20180410020823.GB11203@stefanha-x1.localdomain> Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, gdb@sourceware.org From: Pedro Alves Message-ID: <788e662d-0fb6-8db8-a049-3714eaa32869@redhat.com> Date: Mon, 23 Apr 2018 13:45:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-04/txt/msg00020.txt.bz2 On 04/23/2018 02:37 AM, Simon Marchi wrote: > On 2018-04-09 10:08 PM, Stefan Hajnoczi wrote: >> I wonder what the point of select-frame is then... >> >> I have CCed the GDB mailing list. Maybe someone can help us. Context: >> >> QEMU implements coroutines using jmpbuf. We'd like to print coroutine >> call stacks in GDB and have a script that works when a process is being >> debugged (it sets the registers). >> >> Now we'd like to extend the script to work on core dumps where it's not >> possible to set registers (since there is no process being debugged). >> >> Is there a way to backtrace an arbitrary call stack in a core dump? > > Not that I know of. The "frame " form of the frame > command sounds like it should be usable to achieve that, but it doesn't > seem to work in that way. I really wonder if it's working as it was > intended initially. I guess using that form of the frame command should > override/mask the real current values of $sp and $pc? Yeah, "frame " has a lot of problems. This series was working toward sorting out the "frame" command: https://sourceware.org/ml/gdb-patches/2015-09/msg00248.html Follow the urls there for more background. To me, the important questions to answer are here: https://sourceware.org/ml/gdb-patches/2015-09/msg00658.html Unfortunately, I don't think the series moved past that point. Thanks, Pedro Alves