]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Allow DAP "threads" request when inferior is running
authorTom Tromey <tromey@adacore.com>
Thu, 12 Jun 2025 16:48:25 +0000 (10:48 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 24 Jun 2025 14:38:09 +0000 (08:38 -0600)
commit744dabeb29d6fb07f3fe7d91031adc5c85b7f865
tree6b556869cf50921f9d1593ed72d0b55570f553ba
parentbaba7c9a2ae10eb19c8eff6f5c981268b1f3831e
Allow DAP "threads" request when inferior is running

A user pointed out that DAP allows the "threads" request to work when
the inferior is running.  This is documented in the overview, not the
specification.

While looking into this, I found a few other issues:

* The _thread_name function was not marked @in_gdb_thread.
  This isn't very important but is still an oversight.

* DAP requires all threads to have a name -- the field is not optional
  in the "Thread" type.

* There was no test examining events resulting from the inferior
  printing to stdout.

This patch fixes all these problems.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33080
gdb/python/lib/gdb/dap/threads.py
gdb/testsuite/gdb.dap/threads.c [new file with mode: 0644]
gdb/testsuite/gdb.dap/threads.exp [new file with mode: 0644]