From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HX1Q1-0002b8-BH for qemu-devel@nongnu.org; Thu, 29 Mar 2007 16:40:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HX1Pz-0002Zu-Bs for qemu-devel@nongnu.org; Thu, 29 Mar 2007 16:40:24 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HX1Pz-0002Zq-6C for qemu-devel@nongnu.org; Thu, 29 Mar 2007 15:40:23 -0500 Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HX1NM-0001Ok-8T for qemu-devel@nongnu.org; Thu, 29 Mar 2007 16:37:40 -0400 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20070329203739.QXCF1468.mtaout03-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Thu, 29 Mar 2007 21:37:39 +0100 Received: from miranda.arrow ([213.107.21.212]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20070329203739.VEUQ17393.aamtaout02-winn.ispmail.ntl.com@miranda.arrow> for ; Thu, 29 Mar 2007 21:37:39 +0100 Received: from sdb by miranda.arrow with local (Exim 4.50) id 1HX1NI-0001pV-OX for qemu-devel@nongnu.org; Thu, 29 Mar 2007 21:37:36 +0100 Date: Thu, 29 Mar 2007 21:37:36 +0100 From: Stuart Brady Subject: Re: [Qemu-devel] Re: PC traces from QEMU Message-ID: <20070329203736.GA7024@miranda.arrow> References: <12835c8f0703261313j45f7e23cx1773a20845370a4e@mail.gmail.com> <87ejn80xi8.fsf@brigitte.dna.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ejn80xi8.fsf@brigitte.dna.fi> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Mar 29, 2007 at 08:29:03PM +0300, Antti P Miettinen wrote: > "Shashidhar Mysore" writes: > > I intend to extract program counter streams from QEMU as a program executes. > > Can you please point me to the hooks that I may have to insert into the QEMU > > source code in order to extract the PC values? > > I used to do that with qemu 0.7. I did not dig into this deep enough > to find the minimal changes but at least the following was enough: [...] > - force dc->jmp_opt to zero in target-i386/translate.c I don't quite see where you would do this. BTW, the approach I took was to add something like gen_op_dump_pc(s->pc) near the top of disas_insn (in translate.c), and have op_dump_pc (in op.c) pass the program counter (held in PARAM1) to a helper (in helper.c) that then prints it out. I expect that's not the best approach, but it worked quite well for my purposes. Cheers, -- Stuart Brady