From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68341 invoked by alias); 2 Jan 2019 14:01:46 -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 68331 invoked by uid 89); 2 Jan 2019 14:01:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=background, Follow, toward, pc X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Jan 2019 14:01:43 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1501D88E64; Wed, 2 Jan 2019 14:01:42 +0000 (UTC) Received: from localhost (ovpn-116-137.ams2.redhat.com [10.36.116.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 299A260C68; Wed, 2 Jan 2019 14:01:40 +0000 (UTC) Date: Wed, 02 Jan 2019 14:01:00 -0000 From: Stefan Hajnoczi To: Vladimir Sementsov-Ogievskiy Cc: Pedro Alves , Simon Marchi , Stefan Hajnoczi , "qemu-devel@nongnu.org" , "gdb@sourceware.org" Subject: Re: [Qemu-devel] [PATCH] scripts/qemugdb: support coroutine backtrace in coredumps Message-ID: <20190102140139.GR24009@stefanha-x1.localdomain> References: <20180404103440.19546-1-stefanha@redhat.com> <008ac6e8-1e68-b0f6-7e75-77453721d031@virtuozzo.com> <20180410020823.GB11203@stefanha-x1.localdomain> <788e662d-0fb6-8db8-a049-3714eaa32869@redhat.com> <0ebf0044-d45c-74b4-d323-2391daa12a0c@virtuozzo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7L9kolmstoDTZ4pm" Content-Disposition: inline In-Reply-To: <0ebf0044-d45c-74b4-d323-2391daa12a0c@virtuozzo.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-01/txt/msg00002.txt.bz2 --7L9kolmstoDTZ4pm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2194 On Thu, Dec 27, 2018 at 05:36:04PM +0000, Vladimir Sementsov-Ogievskiy wrot= e: > 23.04.2018 16:28, Pedro Alves wrote: > > 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. Contex= t: > >>> > >>> 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 bei= ng > >>> debugged (it sets the registers). > >>> > >>> Now we'd like to extend the script to work on core dumps where it's n= ot > >>> 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 fr= ame > >> 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 shou= ld > >> override/mask the real current values of $sp and $pc? > >=20 > > Yeah, "frame " has a lot of problems. > >=20 > > This series was working toward sorting out the "frame" command: > >=20 > > https://sourceware.org/ml/gdb-patches/2015-09/msg00248.html > >=20 > > Follow the urls there for more background. > >=20 > > To me, the important questions to answer are here: > > https://sourceware.org/ml/gdb-patches/2015-09/msg00658.html > >=20 > > Unfortunately, I don't think the series moved past that point. > >=20 > > Thanks, > > Pedro Alves > >=20 >=20 >=20 > Hi Pedro! >=20 > Hmm, returned to this topic. I've spent this day digging in gdb code, and= found it much > more difficult than qemu).. >=20 > I've failed to find something like >=20 > create_frame_with_registers, or create_thread_with_registers.. Looks like= registers comes > from some register caches, backed by different sources of registers or so= mething like this. >=20 > So, I'd like to ask several questions: >=20 > 1. Any news on the topic since April? Not on my side, sorry. Stefan --7L9kolmstoDTZ4pm Content-Type: application/pgp-signature; name="signature.asc" Content-length: 455 -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcLMRDAAoJEJykq7OBq3PIzr0H/3JgxuOiiDz1UQqFYGH0k/Uk 2h78ERlQku+DoQJOZGOnip/btanxeFAUHEAdRK5Dr68wx/3rcDzQc/xW8Eq5TvIY D0aiZItMluSJjhXS002k9otMZcrpcKnma4ztGFdJjlnrjq7+5dV/iAqKj7hulmTR xkV6lnzsvNE1XxMWJmVxWxGA4mD9F0NI/j4nlh92qKQvdmigjlCyn4qfVGQifTYc T70Pdm15XayROMuE0+f+9K+LecTrOJhHUAWDL3C5R9OpJRCzCar5DX6f9j6pIBAT 2CE6Kn0IYldoSIqcNgP7JgLwtzLRUKZmx7CuOZsiwt2g3u2o3+Rk2SjwDhu97h4= =1cbv -----END PGP SIGNATURE----- --7L9kolmstoDTZ4pm--