From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22461 invoked by alias); 16 Apr 2006 15:52:26 -0000 Received: (qmail 22453 invoked by uid 22791); 16 Apr 2006 15:52:25 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 16 Apr 2006 15:52:22 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FV9Xw-0006iN-81; Sun, 16 Apr 2006 11:52:20 -0400 Date: Sun, 16 Apr 2006 23:33:00 -0000 From: Daniel Jacobowitz To: Nicholas Mc Guire Cc: gdb@sources.redhat.com Subject: Re: bytecode question Message-ID: <20060416155220.GA25756@nevyn.them.org> Mail-Followup-To: Nicholas Mc Guire , gdb@sources.redhat.com References: <200604161457.k3GEvZbm004592@opentech.lzu.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604161457.k3GEvZbm004592@opentech.lzu.edu.cn> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00218.txt.bz2 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