From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49547 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pa4Z0-0003YT-PZ for qemu-devel@nongnu.org; Tue, 04 Jan 2011 05:56:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pa4Yz-0006V3-M8 for qemu-devel@nongnu.org; Tue, 04 Jan 2011 05:56:26 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:52210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pa4Yz-0006U9-9w for qemu-devel@nongnu.org; Tue, 04 Jan 2011 05:56:25 -0500 Message-ID: <4D22FCD2.2080505@mail.berlios.de> Date: Tue, 04 Jan 2011 11:56:18 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] HELP PLEASE! Consecutive runs of qemu-user References: <4D1F9D33.6070805@gmail.com> In-Reply-To: <4D1F9D33.6070805@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Bonifazi Cc: QEMU Developers Am 01.01.2011 22:31, schrieb Stefano Bonifazi: > Hi! > First of all Happy new year to everybody! :) Wish you all to realize > all your dreams! :) > I edited QEMU user, more exactly qemu-ppc launching the main function > (inside main.c) from another c function I created, passing it the > appropriate parameters. > I also caught the syscall 1 preventing it to abort the process, and > simply returning from cpu_loop function, so that this function is not > more endless, and main returns to my user defined function. > The problem is that launching a second time main with other parameters > fails: leaving the code like it was, the previous translated binary > was kept "in memory" and run again, no matter what binary parameter I > passed to main. > I added then tb_flush(env); after cpu_loop inside main.. > But with this edit launching main with other parameters blocks the > execution at tcg_qemu_tb_exec(tc_ptr); ..It sounds like QEMU stores > the state of the translation even after main function is over :( > Is it possible to reset completely the state, allowing consecutive > runs of different binaries? > What are the state variables I should "clean" between different runs? > Thank you very much for your help! > Best regards! > Stefano B. Hi Stefano, maybe 'qemu -singlestep' helps. Regards, Stefan W.