All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, gdb@sourceware.org
Subject: Re: [Qemu-devel] [PATCH] scripts/qemugdb: support coroutine backtrace in coredumps
Date: Sun, 22 Apr 2018 21:37:52 -0400	[thread overview]
Message-ID: <fefd54c0-d5f2-dc31-ff3c-24eb29fd2101@simark.ca> (raw)
In-Reply-To: <20180410020823.GB11203@stefanha-x1.localdomain>

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 <stack-addr> <pc-addr>" 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?

Simon

  reply	other threads:[~2018-04-23  1:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 10:34 [Qemu-devel] [PATCH] scripts/qemugdb: support coroutine backtrace in coredumps Stefan Hajnoczi
2018-04-09 13:01 ` Vladimir Sementsov-Ogievskiy
2018-04-10  2:08   ` Stefan Hajnoczi
2018-04-23  1:37     ` Simon Marchi [this message]
2018-04-23  9:33       ` Stefan Hajnoczi
2018-04-23  9:48         ` Vladimir Sementsov-Ogievskiy
2018-04-23 13:28       ` Pedro Alves
2018-12-27 17:36         ` Vladimir Sementsov-Ogievskiy
2019-01-02 14:01           ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fefd54c0-d5f2-dc31-ff3c-24eb29fd2101@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb@sourceware.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.