This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: bytecode question
- From: Daniel Jacobowitz <drow at false dot org>
- To: Nicholas Mc Guire <mcguire at lzu dot edu dot cn>
- Cc: gdb at sources dot redhat dot com
- Date: Sun, 16 Apr 2006 11:52:20 -0400
- Subject: Re: bytecode question
- References: <200604161457.k3GEvZbm004592@opentech.lzu.edu.cn>
On Sun, Apr 16, 2006 at 10:57:35PM +0800, Nicholas Mc Guire wrote:
> tracepoint 1 triggert at 80483f2
> found 1 actions for this tp
> action length 13, code 26000422000222040322040c27
> collecting reg 4 = befef5e4
> Trace at befef5e0 (size 4)
> dump size 4, data 00000000
> bc done
>
> Child exited with retcode = 0
>
>
>
> The interpreter loop:
>
> removed all the cases not needed here - the post is overly long allreadyi
> sorry for that.
> My suspicion is that the way I'm collecting the registers in case 0x26
> (bytecode register) is collecting the wrong register content in this case
> (value 0x4 is sp on x86) - any idea what could be wrong here ?
> I called set_desired_inferior in the entry function (the tracepoint handler)
> that then called dump_bytecode - must one do anything more to get hold of
> the registers of the application being traced ?
Why do you think that something is wrong with the register values?
That looks to me like a sane stack pointer.
I gather from the context that you're doing this in gdbserver. It
could be anything; you may have stale registers from the last stop.
I recommend understanding how this works in the normal stop/start
case and where the register cache gets updated.
--
Daniel Jacobowitz
CodeSourcery