[Lldb-commits] [PATCH] D90298: [lldb] [Process/FreeBSDRemote] Implement thread GetName()
Kamil Rytarowski via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 28 05:25:07 PDT 2020
krytarowski added inline comments.
================
Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp:151
-std::string NativeThreadFreeBSD::GetName() { return ""; }
+std::string NativeThreadFreeBSD::GetName() {
+ if (!m_thread_name) {
----------------
It is probably fine, but I would use:
1. `PT_GETNUMLWPS`
2. `PT_GETLWPLIST` with optional caching
3. Read `pl_tdname` from `ptrace_lwpinfo`
================
Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp:164
+ if (ptr == nullptr || (error != 0 && errno == ENOMEM)) {
+ // Add extra space in case threads are added before next call.
+ kp.resize((len / sizeof(struct kinfo_proc)) + 10);
----------------
Isn't this call always synchronous and all the threads are stopped?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90298/new/
https://reviews.llvm.org/D90298
More information about the lldb-commits
mailing list