I am trying to add commands to the monitor which can enable or disable tracing in QEMU. As arguments to this command I would like to pass the process ID of the process I wish to trace. Can anybody tell me how to access the process ID from within QEMU?
Basically, whenever I see an instruction executing I want to capture more details about the instruction such as the type of instruction, the process ID of the process on behalf of which this instruction is executing (other details I'm interested in is if this is a load or store, memory address, and memory value loaded/stored, etc). Can you please tell me how to figure out these details, especially the process ID.