avatar2
avatar2 copied to clipboard
PyPanda: disable -monitor
PyPanda's Panda() top-level class by default creates an interactive monitor like -monitor unix:/tmp/pypanda_mbwril7yr,server,nowait
. I dont believe monitor is not the same as QMP, but a text based protocol
There are couple of ideas:
- Always disable PyPanda's monitor by passing
raw_monitor=True
(https://github.com/panda-re/panda/blob/716b782f3f604d990f361cbab3186b4e0c73540f/panda/python/core/pandare/panda.py#L59) - Provide an option to PyPanda target creation to disable this by default, but still enable it if needed
The main reason for disabling this is that running PyPanda many times can end up polluting /tmp
Hi!
~~Disabling PyPanda's monitor should be currently possible via additional_args
in the QemuTarget because of assemble_cmd_line()
here.~~
But i would be in favor on changing the default behavior via a new option in PyPanda target.
I tried that, but doesn't raw_monitor needs to be passed as a kwarg, not an array of strings. Can you show me?
My bad, it's kwargs from init_target
that should be used. Unfortunately this would not work using Avatar's init_targets()
:/
from avatar2 import Avatar
from avatar2.targets import PyPandaTarget
av = Avatar()
pp = PyPandaTarget(av)
pp.init(raw_monitor=True)
pp.shutdown()