[Lldb-commits] [PATCH] D90298: [lldb] [Process/FreeBSDRemote] Implement thread GetName()

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 28 06:14:25 PDT 2020


labath added a comment.

I am not sure that the caching is really needed, but this seems ok to me. I'm assuming that this fixes TestGdbRemoteThreadName.py...



================
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);
----------------
krytarowski wrote:
> Isn't this call always synchronous and all the threads are stopped?
I would certainly expect so


================
Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp:171
+        LLDB_LOG(log, "tid = {0} in state {1} failed to get thread name: {2}", GetID(),
+                 StateAsCString(m_state), strerror(errno));
+      }
----------------
just `m_state`, it's cleaner


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

https://reviews.llvm.org/D90298



More information about the lldb-commits mailing list