Received: from eggs.gnu.org ([208.118.235.92]:53677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sgx0n-00037P-Bg for qemu-devel@nongnu.org; Tue, 19 Jun 2012 07:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sgx0l-000576-C8 for qemu-devel@nongnu.org; Tue, 19 Jun 2012 07:54:20 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:34698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sgx0j-00054u-RN for qemu-devel@nongnu.org; Tue, 19 Jun 2012 07:54:19 -0400 Date: Tue, 19 Jun 2012 19:54:03 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120619115403.GA49013@cs.nctu.edu.tw> References: <20120618074756.GA47810@cs.nctu.edu.tw> <4FDEFC6F.10104@suse.de> <20120619090230.GA39361@cs.nctu.edu.tw> <4FE04C66.2070203@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FE04C66.2070203@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Any better way to access CPUArchState in vl.c? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: qemu-devel@nongnu.org, =?utf-8?B?IumZs+mfi+S7uyAoV2VpLVJlbiBDaGVuKSI=?= > If you only have one CPU then using first_cpu->some_field1 should be > almost as easy. :) I am afraid first_cpu (CPUArchState) is got poisoned, too. :/ Even I comment out CPUArchState from poison.h, --- vl.c extern CPUArchState *first_cpu; static void main_loop(void) { ... snip ... printf("%d", first_cpu->created); } --- I still get compilation error below, --- /tmp/chenwj/qemu/vl.c:1548:20: error: expected '=3D', ',', ';', 'asm' or = '__attribute__' before '*' token /tmp/chenwj/qemu/vl.c: In function 'main_loop': /tmp/chenwj/qemu/vl.c:1568:18: error: 'first_cpu' undeclared (first use i= n this function) --- Any thought on what I am missing? Thanks. Regards, chenwj --=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