Received: from eggs.gnu.org ([208.118.235.92]:45583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShFsp-0001et-JI for qemu-devel@nongnu.org; Wed, 20 Jun 2012 04:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShFsc-0004bn-F6 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 04:03:23 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:22230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShFsa-0004ZX-UN for qemu-devel@nongnu.org; Wed, 20 Jun 2012 04:03:10 -0400 Date: Wed, 20 Jun 2012 16:03:01 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120620080300.GB15203@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> <20120619115403.GA49013@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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: Peter Maydell Cc: Andreas =?utf-8?Q?F=C3=A4rber?= , =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= , qemu-devel@nongnu.org On Tue, Jun 19, 2012 at 01:08:47PM +0100, Peter Maydell wrote: > On 19 June 2012 12:54, =E9=99=B3=E9=9F=8B=E4=BB=BB (Wei-Ren Chen) wrote: > >> If you only have one CPU then using first_cpu->some_field1 should be > >> almost as easy. :) > > > > =C2=A0I am afraid first_cpu (CPUArchState) is got poisoned, too. :/ >=20 > Yes. You'll need to write a function which lives in a source file which > has access to the poisoned symbols, and then call that from vl.c. > hw_error() might be a useful example to follow. I take your approach, 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