|
From: | Vince Weaver |
Subject: | Re: [Qemu-devel] Re: [patch] gdb-stub support for Alpha |
Date: | Thu, 4 Dec 2008 14:26:32 -0500 (EST) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |