On 08/04/2021 17:40, Paolo Bonzini wrote:
On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote:
+        self.gdb_qemu = os.getenv('GDB_QEMU')
+
+        if gdb and not self.gdb_qemu:
+            self.gdb_qemu = 'localhost:12345'
+        elif self.gdb_qemu and not gdb:
+            del self.gdb_qemu
+            del os.environ['GDB_QEMU']

Alternatively:

     if gdb:
         self.gdb_qemu = os.environ.get('GDB_QEMU', 'localhost:12345')
     elif 'GDB_QEMU' in os.environ:
         del os.environ['GDB_QEMU']

makes sense, thanks.

+GDB_QEMU      -- "{GDB_QEMU}"

Perhaps only include this if gdbserver is actually in use?  (Or not at all, since gdbserver anyway prints the port).

You forgot that by default all logs go to a log file :) so unless you find the corresponding log, it is not easy to find the GDB port.

Thank you,
Emanuele


Paolo



Reply via email to