qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Any better way to access CPUArchState in vl.c?
@ 2012-06-18  7:47 陳韋任 (Wei-Ren Chen)
  2012-06-18 10:01 ` Andreas Färber
  0 siblings, 1 reply; 10+ messages in thread
From: 陳韋任 (Wei-Ren Chen) @ 2012-06-18  7:47 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-06-20  8:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18  7:47 [Qemu-devel] Any better way to access CPUArchState in vl.c? 陳韋任 (Wei-Ren Chen)
2012-06-18 10:01 ` Andreas Färber
2012-06-19  9:02   ` 陳韋任 (Wei-Ren Chen)
2012-06-19  9:54     ` Andreas Färber
2012-06-19 11:54       ` 陳韋任 (Wei-Ren Chen)
2012-06-19 12:08         ` Peter Maydell
2012-06-20  8:03           ` 陳韋任 (Wei-Ren Chen)
2012-06-19 12:09         ` Peter Crosthwaite
2012-06-19 13:21           ` Andreas Färber
2012-06-19 12:12         ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).