qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Any better way to access CPUArchState in vl.c?


From: Wei-Ren Chen
Subject: [Qemu-devel] Any better way to access CPUArchState in vl.c?
Date: Mon, 18 Jun 2012 15:47:56 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

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 
"CPUArchState"
  /tmp/chenwj/qemu/dyngen-exec.h:64:23: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '*' token
  /tmp/chenwj/qemu/dyngen-exec.h:64:24: error: attempt to use poisoned "env"

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 = &env->some_field;

but it's not very convenient if we have many field of CPUState want to access. 
Is
there a better way to do so? Thanks!

Regards,
chenwj 

[1]
http://stackoverflow.com/questions/9461625/gcc-error-message-attempt-to-use-poisoned-target-i386

-- 
Wei-Ren Chen (陳韋任)
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]