[Lldb-commits] [PATCH] D70363: [lldb] [Process/NetBSD] Implement thread name getting

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 18 00:19:40 PST 2019


krytarowski added inline comments.


================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp:122
+  if (::sysctl(mib, 5, nullptr, &size, nullptr, 0) == -1 || size == 0) {
+    LLDB_LOG(log, "sysctl() for LWP info size failed: {0}", strerror(errno));
+    return "";
----------------
labath wrote:
> Thread-safety technically doesn't matter in this part of the code, but I think it would be good practice to use `llvm::StrError` (`llvm/Support/Errno.h`) anyway. 
`strerror` is thread safe on NetBSD, but probably better to pick llvm interfaces.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70363/new/

https://reviews.llvm.org/D70363





More information about the lldb-commits mailing list