[Lldb-commits] [PATCH] D11652: Report actual tids from FreeBSD core files
Ed Maste
emaste at freebsd.org
Fri Jul 31 07:25:09 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL243748: Report original thread ID for FreeBSD core files (authored by emaste).
Changed prior to commit:
http://reviews.llvm.org/D11652?vs=31056&id=31120#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11652
Files:
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h
Index: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
@@ -37,9 +37,8 @@
//----------------------------------------------------------------------
// 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),
Index: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -258,7 +258,7 @@
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 @@
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 @@
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;
Index: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h
===================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h
@@ -112,15 +112,15 @@
lldb_private::DataExtractor gpregset;
lldb_private::DataExtractor fpregset;
lldb_private::DataExtractor vregset;
+ lldb::tid_t tid;
int signo;
std::string name;
};
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 ();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11652.31120.patch
Type: text/x-patch
Size: 2932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150731/653a7ea6/attachment.bin>
More information about the lldb-commits
mailing list