mgorny created this revision.
mgorny added reviewers: krytarowski, labath.
Herald added a subscriber: jfb.
Fix incorrect type passed to pthread_setname_np() on NetBSD. This fixes
the test to build fine but the underlying function is still not
implemented.
https://reviews.llvm.org/D70363
Files:
lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
Index:
lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
@@ -9,7 +9,7 @@
#elif defined(__linux__)
::pthread_setname_np(::pthread_self(), name);
#elif defined(__NetBSD__)
- ::pthread_setname_np(::pthread_self(), "%s", name);
+ ::pthread_setname_np(::pthread_self(), "%s", static_cast<void*>(name));
#endif
}
Index:
lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
===================================================================
---
lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
+++
lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
@@ -30,7 +30,7 @@
self.assertEqual(expected_name, kv_dict.get("name"))
@skipIfWindows # the test is not updated for Windows.
- @skipIfNetBSD # build failure due to pthread_setname_np prototype
+ @expectedFailureNetBSD
@llgs_test
def test(self):
""" Make sure lldb-server can retrieve inferior thread name"""
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
@@ -9,7 +9,7 @@
#elif defined(__linux__)
::pthread_setname_np(::pthread_self(), name);
#elif defined(__NetBSD__)
- ::pthread_setname_np(::pthread_self(), "%s", name);
+ ::pthread_setname_np(::pthread_self(), "%s", static_cast<void*>(name));
#endif
}
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
@@ -30,7 +30,7 @@
self.assertEqual(expected_name, kv_dict.get("name"))
@skipIfWindows # the test is not updated for Windows.
- @skipIfNetBSD # build failure due to pthread_setname_np prototype
+ @expectedFailureNetBSD
@llgs_test
def test(self):
""" Make sure lldb-server can retrieve inferior thread name"""
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits