[pushed] Use 'name' in DAP start_thread function

Message ID 20230723213431.2103596-1-tom@tromey.com
State New
Headers
Series [pushed] Use 'name' in DAP start_thread function |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 warning Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_check--master-arm warning Patch failed to apply

Commit Message

Tom Tromey July 23, 2023, 9:34 p.m. UTC
  The DAP start_thread helper function has a 'name' parameter that is
unused.  Apparently I forgot to hook it up to the thread constructor.
This patch fixes the oversight.
---
 gdb/python/lib/gdb/dap/startup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gdb/python/lib/gdb/dap/startup.py b/gdb/python/lib/gdb/dap/startup.py
index 15d1fb9e9e5..eba072147ee 100644
--- a/gdb/python/lib/gdb/dap/startup.py
+++ b/gdb/python/lib/gdb/dap/startup.py
@@ -35,7 +35,7 @@  def start_thread(name, target, args=()):
     """Start a new thread, invoking TARGET with *ARGS there.
     This is a helper function that ensures that any GDB signals are
     correctly blocked."""
-    result = gdb.Thread(target=target, args=args, daemon=True)
+    result = gdb.Thread(name=name, target=target, args=args, daemon=True)
     result.start()