From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZm29-0001FQ-7p for qemu-devel@nongnu.org; Wed, 18 Feb 2009 08:00:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZm28-0001EZ-Ko for qemu-devel@nongnu.org; Wed, 18 Feb 2009 08:00:12 -0500 Received: from [199.232.76.173] (port=48038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZm27-0001EA-VX for qemu-devel@nongnu.org; Wed, 18 Feb 2009 08:00:12 -0500 Received: from fg-out-1718.google.com ([72.14.220.157]:16094) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZm27-0005WG-72 for qemu-devel@nongnu.org; Wed, 18 Feb 2009 08:00:11 -0500 Received: by fg-out-1718.google.com with SMTP id e21so787430fga.8 for ; Wed, 18 Feb 2009 05:00:07 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <499C03A9.6040003@gmail.com> References: <499C03A9.6040003@gmail.com> Date: Wed, 18 Feb 2009 14:00:07 +0100 Message-ID: <761ea48b0902180500wbe676d4x3895d37df10e495b@mail.gmail.com> Subject: Re: [Qemu-devel] Monitor Memory Accesses From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Wed, Feb 18, 2009 at 1:48 PM, Andrea Pellegrini wrote: > I want to track all the memory accesses performed in a program execution. > Right now I'm working on an amd64 machine with target x86_64 but eventually > I would like to do the same for other architectures (at least ARM and PPC). > With few changes I was able to print out the address of the instructions > that the processor executes (well at least the first address of the basic > block) I guess you're doing that by calling a helper. If you don't, that won't work :-) > and now I was looking for a way to record all memory loads and > stores. I believe I have to change some code in the file translate.c and I > was wondering if anybody can give me a quick help about which part of code I > should change. It would be great if I could call a function right before > every time a load or store is executed. You should look for parts of translate.c that generate target loads and stores; basically look for calls to tcg_gen_qemu_ld* and tcg_gen_qemu_st*. Laurent