qemu-discuss
[Top][All Lists]
Advanced

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

Re: only apply tcg plugin in a certain process in system mode


From: Alex Bennée
Subject: Re: only apply tcg plugin in a certain process in system mode
Date: Thu, 30 Mar 2023 10:04:58 +0100
User-agent: mu4e 1.10.0; emacs 29.0.60

syheliel syheliel <syheliel@gmail.com> writes:

> I want to use tcg plugin to trace a particular process in system mode. But I 
> find that the current tcg plugin
> will work on all process:
> ```
> ./qemu-system-x86_64 -plugin tests/plugin/libinsn.so \
>     -d plugin ../tests/tcg/multiarch/threadcount
> ```
> above command will apply libinsn.so to all process and generate a large 
> output. How can I get pid or sth else
> to help me only register the tcg plugin to a certain process?

That makes no sense as you are using qemu-system to run a user-mode
binary. If you are running qemu user mode then plugin callbacks are in
the same process context as the guest code so you could simply call
getpid() or equivalent.

>
> - syheliel


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



reply via email to

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