qemu-block
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v2 03/11] qemu-iotests: add option to attach gdbserver


From: Emanuele Giuseppe Esposito
Subject: Re: [RFC PATCH v2 03/11] qemu-iotests: add option to attach gdbserver
Date: Thu, 8 Apr 2021 18:02:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1



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

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