QEMU execution traces for a simple program (guest mode)

60 views Asked by At

I am starting my QEMU VM with the following command to get the execution traces for a simple hello world program in C.

qemu-system-riscv64 -singlestep -d nochain,cpu -D $trace ${binary}.

For guidance, I am following this tutorial. How is it that in slide 4, the size of the traces are 65K, whereas, my file just keeps growing (in GBs). I understand that it is monitoring the traces and hence the file size grows. My questions are:

  1. Am I using the right command to get the execution traces? If not, please help in getting the correct command to only get the traces for the binary.

  2. I am assuming that by giving the binary file as an argument, QEMU executes it when it launches the window. If this is not the case, how would I execute this hello world program inside the qemu window?

  3. Lastly, I am assuming that the command is not doing full system virtualisation. I just need the traces, so I don't think that will be necessary. Is my assumption wrong? or is this command not sufficient?

Any help would be greatly appreciated. I have been stuck in this for a while now.

0

There are 0 answers