diff options
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX/POSIXThread.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/POSIX/POSIXThread.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp index 09f0525c63a..e55ba265d89 100644 --- a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp +++ b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp @@ -41,7 +41,9 @@ using namespace lldb_private; POSIXThread::POSIXThread(Process &process, lldb::tid_t tid) : Thread(process, tid), - m_frame_ap() + m_frame_ap (), + m_breakpoint (), + m_thread_name () { Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) @@ -104,6 +106,23 @@ POSIXThread::GetInfo() return NULL; } +void +POSIXThread::SetName (const char *name) +{ + if (name && name[0]) + m_thread_name.assign (name); + else + m_thread_name.clear(); +} + +const char * +POSIXThread::GetName () +{ + if (m_thread_name.empty()) + return NULL; + return m_thread_name.c_str(); +} + lldb::RegisterContextSP POSIXThread::GetRegisterContext() { |