Include the crashing thread's name in crash dumps.
Change-Id: I7fd821e3f390fde3a7280689292373d413218893
diff --git a/src/thread.cc b/src/thread.cc
index b263039..b177cf8 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -465,13 +465,7 @@
<< " tid=" << thread->GetThinLockId()
<< " " << thread->GetState() << "\n";
} else {
- std::string thread_name;
- if (ReadFileToString(StringPrintf("/proc/self/task/%d/comm", tid), &thread_name)) {
- thread_name.resize(thread_name.size() - 1); // Lose the trailing '\n'.
- } else {
- thread_name = "<unknown>";
- }
- os << '"' << thread_name << '"'
+ os << '"' << ::art::GetThreadName(tid) << '"'
<< " prio=" << priority
<< " (not attached)\n";
}