qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vince Weaver <vince@csl.cornell.edu>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [patch] gdb-stub support for Alpha
Date: Thu, 4 Dec 2008 14:26:32 -0500 (EST)	[thread overview]
Message-ID: <20081204142401.E24640@stanley.csl.cornell.edu> (raw)
In-Reply-To: <4937FE1F.4000803@siemens.com>


On Thu, 4 Dec 2008, Jan Kiszka wrote:
> I would suggest checking out what gets translated, executed and
> communicated by using '-d in_asm,out_asm' for the qemu command line,
> running qemu itself inside gdb and maybe also enabling 'set debug remote
> 1' in the remote gdb instance (which will print the frontend<->backend
> communication). That should help to get a better picture about what
> happens and why you see double steps.

Thanks!  That helped track down the problem.

On Alpha, for non-branch instructions the move of ctx->pc to cpu_pc 
happens at the end of the TB (after the single-step exception is called).

However, for branches, the move of ctx->pc to cpu_pc happens within the 
instruction decoding, *before* the single-step exception is called, so the 
exception handler over-writes the proper new pc with an older one.

This is tricky to fix.  Either all the branch code needs to be re-written 
to write to a temporary nextpc value that is written at the end, or else
I have to somehow wrap the single-step exception code to preserve the new 
pc value.

Vince

  reply	other threads:[~2008-12-04 19:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 18:16 [Qemu-devel] [patch] gdb-stub support for Alpha Vince Weaver
2008-12-04  5:25 ` Vince Weaver
2008-12-04 15:58   ` [Qemu-devel] " Jan Kiszka
2008-12-04 19:26     ` Vince Weaver [this message]
2008-12-07 23:26   ` [Qemu-devel] " Aurelien Jarno

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=20081204142401.E24640@stanley.csl.cornell.edu \
    --to=vince@csl.cornell.edu \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).