qemu-discuss
[Top][All Lists]
Advanced

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

Automating Qemu and GDB together


From: R. Diez
Subject: Automating Qemu and GDB together
Date: Sat, 9 May 2020 16:16:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Hi all:

I want to press a key and have my editor automatically launch Qemu and GDB. Like you do from within an IDE when writing PC software. How do I synchronise Qemu and GDB?

In case the question is not clear enough, here are the steps:

1) Start Qemu.
2) Wait until Qemu is ready to accept a GDB connection.
3) Start GDB in a new window.

The problem is step (2). I can launch Qemu in the background, pause for some time, and then launch GDB. However, if I make the pause too short, GDB will fail to connect, and if I make the pause too long, I will waste the user's time.

Besides, depending on the current system load, Qemu will sometimes need a 
longer time to start. For example, the first time, when the disk cache is cold.

I had a similar issue with OpenOCD and GDB. But OpenOCD accepts scripting commands, so I told it to write to a FIFO after initialising. The top-level script just needs to wait on the FIFO.

Alas, I have not seen a way to do that with Qemu yet. Can I somehow tell Qemu to run a command when the virtual machine is ready to accept a GDB connection?

Thanks in advance,
  rdiez


reply via email to

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