[all-commits] [llvm/llvm-project] 9af5e0: [lldb-dap] Treat empty thread names as unset (#141...
nerix via All-commits
all-commits at lists.llvm.org
Thu May 29 14:37:25 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9af5e0628347dff59c1b23c4be579889986d8530
https://github.com/llvm/llvm-project/commit/9af5e0628347dff59c1b23c4be579889986d8530
Author: nerix <nerixdev at outlook.de>
Date: 2025-05-29 (Thu, 29 May 2025)
Changed paths:
M lldb/test/API/tools/lldb-dap/threads/Makefile
M lldb/test/API/tools/lldb-dap/threads/TestDAP_threads.py
R lldb/test/API/tools/lldb-dap/threads/main.c
A lldb/test/API/tools/lldb-dap/threads/main.cpp
M lldb/tools/lldb-dap/JSONUtils.cpp
Log Message:
-----------
[lldb-dap] Treat empty thread names as unset (#141529)
When a target thread returned an empty but not `nullptr` string as its
name, the thread would show up with an empty name in lldb-dap.
I don't know how this works on macOS and Linux, but on Windows,
[`TargetThreadWindows::GetName`](https://github.com/llvm/llvm-project/blob/deedc8a181b9598d188b2175357bce990a271d5d/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp#L178-L204)
returns a non-null pointer to an empty string, because on MSVC's STL,
`std::string{}.c_str()` returns a pointer to inside the object (the SSO
storage).
This changes the check in `CreateThread`, when no custom thread
formatter is set, to check for the length of the thread and queue name
instead of it being `nullptr`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list