[Lldb-commits] [PATCH] D90298: [lldb] [Process/FreeBSDRemote] Implement thread GetName()
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 28 09:51:19 PDT 2020
mgorny marked 3 inline comments as done.
mgorny 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) {
----------------
krytarowski wrote:
> It is probably fine, but I would use:
>
> 1. `PT_GETNUMLWPS`
> 2. `PT_GETLWPLIST` with optional caching
> 3. Read `pl_tdname` from `ptrace_lwpinfo`
`PT_GETLWPLIST` returns only LWP IDs. `struct ptrace_lwpinfo` is used by `PT_LWPINFO` which returns info about the thread causing the process to stop, not an arbitrary thread.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90298/new/
https://reviews.llvm.org/D90298
More information about the lldb-commits
mailing list