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