Hi Ilya,

On 10/21/24 16:31, Ilya Leoshkevich wrote:
On Mon, 2024-10-21 at 16:08 -0300, Gustavo Romero wrote:
Hi,

On 10/21/24 12:08, Peter Maydell wrote:
On Mon, 21 Oct 2024 at 16:02, Ilya Leoshkevich <i...@linux.ibm.com>
wrote:

GDB 15 does not like exit() anymore:

      (gdb) python exit(0)
      Python Exception <class 'SystemExit'>: 0
      Error occurred in Python: 0

Use the GDB's own exit command, like it's already done in a
couple
places, everywhere.

This is the same bug that commit 93a3048dcf4565 is
fixing, but it looks like we didn't catch everywhere.

Yep.

So maybe now change in test_gdbstub.py this line:

      gdb.execute(f"exit {fail_count}")

to use the new gdb_exit()?

Thanks for taking a look! I think I'm already doing this here?

@@ -62,4 +68,4 @@ def main(test, expected_arch=None):
          pass
print("All tests complete: {} failures".format(fail_count))
-    gdb.execute(f"exit {fail_count}")
+    gdb_exit(fail_count)

BTW, last news from this issue is that it seems to be fixed
in GDB 15.2 [0] (I haven't tried it). However, the fix using
gdb.exit(n) is still correct.

Interesting, I didn't realize this was a bug and not a design
change. Still, given that the buggy GDBs are out there, I'd prefer to
have this change.

Yeah, exactly, for my fix I understood it was a design change at that
time too, then there is this fix on GDB 15.2 :) Right, I also prefer
having these fixes in place for QEMU. Thanks.


Cheers,
Gustavo

Reply via email to