Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IS5kG-00035N-G7 for qemu-devel@nongnu.org; Mon, 03 Sep 2007 02:49:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IS5kF-00034Q-ET for qemu-devel@nongnu.org; Mon, 03 Sep 2007 02:49:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IS5kF-00034G-8F for qemu-devel@nongnu.org; Mon, 03 Sep 2007 02:49:11 -0400 Received: from m5-81.163.com ([202.108.5.81]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IS5kE-0003Eu-6Z for qemu-devel@nongnu.org; Mon, 03 Sep 2007 02:49:10 -0400 Date: Tue, 4 Sep 2007 14:48:53 +0800 From: "topjupiter@163.com" Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: <46DBAE5D.09DA3E.32390@m5-81.163.com> Subject: [Qemu-devel] Problems with Modifying "TranslationBlock" 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 Hi, everybody, I have encountered an odd problem. I want to mark the "TranslationBlock" when the code running on guest-os is a 'call' one or a 'ret' one. So I add some member variables in "TranslationBlock" of "exec-all.h". Just like the following: typedef struct TranslationBlock { target_ulong pc; /* simulated PC corresponding to this block (EIP + CS base) */ .......... struct TranslationBlock *jmp_first; int is_call; // I add this if the translation block is a 'call' block int is_ret; // I add this if the translation block is a 'ret' block } Moreover, I add some codes in "Translation.c" to mark the current block 'call' or 'ret'. Although the code I add seems work well, the result is not correct. Moreover, if I add the member variables before 'pc' in TranslationBlock, qemu does not even work. So can anyone help me? Thanks a lot in advance. Kevin