atos-tools / qemu

QEMU with instrumentation support, ref to tcg/plugins/README
https://guillon.github.io/qemu-plugins
Other
5 stars 8 forks source link

(monitor) interaction #3

Open s0i37 opened 5 years ago

s0i37 commented 5 years ago

Hello. Please tell me, how can interact with my plugin through "(monitor)" custom command? Thank you.

second-reality commented 5 years ago

Hello, we do not offer a way to work with qemu-monitor, if this is what you are talking about.

But, you can dialog through gdbstub. See an example here: https://github.com/second-reality/seb (see doc: https://github.com/second-reality/seb/blob/master/doc/presentation_st_2017_04_07.rst). It allow you to read/write values to your plugin, but you need to be running in user mode, and use seb as driver. See seb.py (code is easy and short) which loads gdb and needed files to offer interaction.

Another solution would be to launch a thread and implement a server to interact with your plugin, taking care that it could break things.