summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/linux/Host.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-09-09 20:54:56 +0000
committerZachary Turner <zturner@google.com>2014-09-09 20:54:56 +0000
commit39de3110712cb4547a835777310dbead46c1a002 (patch)
treed0f99eb4b7f8ab35272587ad4a0e070675752b54 /lldb/source/Host/linux/Host.cpp
parent7decae153bdb4b4a98fa48bb27564fa4597d1cfa (diff)
downloadbcm5719-llvm-39de3110712cb4547a835777310dbead46c1a002.tar.gz
bcm5719-llvm-39de3110712cb4547a835777310dbead46c1a002.zip
Create a HostThread abstraction.
This patch moves creates a thread abstraction that represents a thread running inside the LLDB process. This is a replacement for otherwise using lldb::thread_t, and provides a platform agnostic interface to managing these threads. Differential Revision: http://reviews.llvm.org/D5198 Reviewed by: Jim Ingham llvm-svn: 217460
Diffstat (limited to 'lldb/source/Host/linux/Host.cpp')
-rw-r--r--lldb/source/Host/linux/Host.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index 0bad90ee22e..3d90fbb16c5 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -373,31 +373,6 @@ Host::GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_info)
}
void
-Host::ThreadCreated (const char *thread_name)
-{
- if (!Host::SetThreadName (LLDB_INVALID_PROCESS_ID, LLDB_INVALID_THREAD_ID, thread_name))
- {
- Host::SetShortThreadName (LLDB_INVALID_PROCESS_ID, LLDB_INVALID_THREAD_ID, thread_name, 16);
- }
-}
-
-std::string
-Host::GetThreadName (lldb::pid_t pid, lldb::tid_t tid)
-{
- assert(pid != LLDB_INVALID_PROCESS_ID);
- assert(tid != LLDB_INVALID_THREAD_ID);
-
- // Read /proc/$TID/comm file.
- lldb::DataBufferSP buf_sp = ProcFileReader::ReadIntoDataBuffer (tid, "comm");
- const char *comm_str = (const char *)buf_sp->GetBytes();
- const char *cr_str = ::strchr(comm_str, '\n');
- size_t length = cr_str ? (cr_str - comm_str) : strlen(comm_str);
-
- std::string thread_name(comm_str, length);
- return thread_name;
-}
-
-void
Host::Backtrace (Stream &strm, uint32_t max_frames)
{
if (max_frames > 0)
OpenPOWER on IntegriCloud