Received: from eggs.gnu.org ([208.118.235.92]:36356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgWh2-0002fZ-DP for qemu-devel@nongnu.org; Mon, 18 Jun 2012 03:48:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgWh0-0002Ng-G5 for qemu-devel@nongnu.org; Mon, 18 Jun 2012 03:48:11 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:13413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgWgz-0002Me-RO for qemu-devel@nongnu.org; Mon, 18 Jun 2012 03:48:10 -0400 Received: from csmailer.cs.nctu.edu.tw (localhost [127.0.0.1]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 47B4F5F4 for ; Mon, 18 Jun 2012 15:47:58 +0800 (CST) Received: from alumni.cs.nctu.edu.tw (alumni.cs.nctu.edu.tw [140.113.235.116]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 313CB5F3 for ; Mon, 18 Jun 2012 15:47:58 +0800 (CST) Received: (from chenwj@localhost) by alumni.cs.nctu.edu.tw (8.14.4/8.14.4/Submit) id q5I7lvHs049306 for qemu-devel@nongnu.org; Mon, 18 Jun 2012 15:47:57 +0800 (CST) (envelope-from chenwj) Date: Mon, 18 Jun 2012 15:47:56 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120618074756.GA47810@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Any better way to access CPUArchState in vl.c? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, Say I want to print env->some_field in vl.c. I #include "dyngen-exec.h" in vl.c, but got compilation error immediately. /tmp/chenwj/qemu/dyngen-exec.h:64:10: error: attempt to use poisoned "C= PUArchState" /tmp/chenwj/qemu/dyngen-exec.h:64:23: error: expected '=3D', ',', ';', = 'asm' or '__attribute__' before '*' token /tmp/chenwj/qemu/dyngen-exec.h:64:24: error: attempt to use poisoned "e= nv" After googling, I figure out QEMU poison some identifiers which cannot be= used in target indenpent code. Although we can get some_field by the following= way, int some_field =3D &env->some_field; but it's not very convenient if we have many field of CPUState want to ac= cess. Is there a better way to do so? Thanks! Regards, chenwj=20 [1] http://stackoverflow.com/questions/9461625/gcc-error-message-attempt-to-u= se-poisoned-target-i386 --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj