qemu-discuss
[Top][All Lists]
Advanced

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

Re: How to get PID in tcg plugin


From: Alex Bennée
Subject: Re: How to get PID in tcg plugin
Date: Thu, 30 Mar 2023 14:18:57 +0100
User-agent: mu4e 1.10.0; emacs 29.0.60

David Smitley <smitley@super.org> writes:

> Is there an estimated time frame for when register access will be
> available from a plugin? Is there are branch with this feature that
> someone could try out?

I hope to have something that can do it this year but it involves a
fairly big re-factor of the internals of QEMU to avoid duplicating all
the register access stuff. It's currently a spare time project so I make
no promises.

You could wire up a local hack into your tree in the meantime. Add a
header into qemu-plugin.h, implement the hook in plugins/api.c and
qemu-plugin.symbols and fish out:

    CPUState *cpu = current_cpu;

and from there you can get to CPUArchState/env and grab the register
value you want from it. Obviously this would not be up-streamable but
would at least allow you to experiment locally.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



reply via email to

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