diff options
| -rw-r--r-- | lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp | 6 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp | 5 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/elf-core/ThreadElfCore.h | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index bf5cad8e39c..a9dfbb204e1 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -258,7 +258,7 @@ ProcessElfCore::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_t for (lldb::tid_t tid = 0; tid < num_threads; ++tid) { const ThreadData &td = m_thread_data[tid]; - lldb::ThreadSP thread_sp(new ThreadElfCore (*this, tid, td)); + lldb::ThreadSP thread_sp(new ThreadElfCore (*this, td)); new_thread_list.AddThread (thread_sp); } return new_thread_list.GetSize(false) > 0; @@ -429,7 +429,7 @@ ParseFreeBSDPrStatus(ThreadData &thread_data, DataExtractor &data, offset += 16; thread_data.signo = data.GetU32(&offset); // pr_cursig - offset += 4; // pr_pid + thread_data.tid = data.GetU32(&offset); // pr_pid if (lp64) offset += 4; @@ -543,6 +543,8 @@ ProcessElfCore::ParseThreadContextsFromNoteSegment(const elf::ELFProgramHeader * header_size = ELFLinuxPrStatus::GetSize(arch); len = note_data.GetByteSize() - header_size; thread_data->gpregset = DataExtractor(note_data, header_size, len); + // FIXME: Obtain actual tid on Linux + thread_data->tid = m_thread_data.size(); break; case NT_FPREGSET: thread_data->fpregset = note_data; diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp index 2abb6ba5dec..9cc7829fc39 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp @@ -37,9 +37,8 @@ using namespace lldb_private; //---------------------------------------------------------------------- // Construct a Thread object with given data //---------------------------------------------------------------------- -ThreadElfCore::ThreadElfCore (Process &process, tid_t tid, - const ThreadData &td) : - Thread(process, tid), +ThreadElfCore::ThreadElfCore (Process &process, const ThreadData &td) : + Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp (), m_signo(td.signo), diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h index 50502c101da..9d4d769ddab 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h @@ -112,6 +112,7 @@ struct ThreadData lldb_private::DataExtractor gpregset; lldb_private::DataExtractor fpregset; lldb_private::DataExtractor vregset; + lldb::tid_t tid; int signo; std::string name; }; @@ -119,8 +120,7 @@ struct ThreadData class ThreadElfCore : public lldb_private::Thread { public: - ThreadElfCore (lldb_private::Process &process, lldb::tid_t tid, - const ThreadData &td); + ThreadElfCore (lldb_private::Process &process, const ThreadData &td); virtual ~ThreadElfCore (); |

