Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IBdYB-0002Ok-Ur for qemu-devel@nongnu.org; Thu, 19 Jul 2007 17:28:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IBdYA-0002OR-El for qemu-devel@nongnu.org; Thu, 19 Jul 2007 17:28:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IBdYA-0002OO-CD for qemu-devel@nongnu.org; Thu, 19 Jul 2007 17:28:42 -0400 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IBdY9-0005Do-SZ for qemu-devel@nongnu.org; Thu, 19 Jul 2007 17:28:42 -0400 Date: Thu, 19 Jul 2007 23:28:39 +0200 From: Simon Peter Message-Id: <20070719232839.21a18591.simon.peter@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Tracing function calls 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 Hi, is it possible to log some values from memory every time the instruction counter hits a certain value? Effectively, I want to achieve what would be called a tracepoint in GDB. Since tracepoints seem not to be implemented with QEMU, I would like to do a quick hack that just logs the variables that I would like to trace. Unfortunately, I'm having problems: I tried to add a printf() into the gen_intermediate_code_internal() function in target-i386/translate.c, right before the breakpoint handling code. The code logs the correct values, but it gets called by far not as often as it should be. If I connect GDB through the network interface and set a breakpoint at the position that I'd like to trace, the breakpoint (and suddenly, also my logging code) is hit far more often. How can I get my code getting called as often as it should be? What am I doing wrong? Thanks a lot! Simon