Include the thread name in Thread's operator<< output.
For example:
Thread[2,tid=1692,VmWait,Thread*=0x416914d0,"Signal Catcher"]: reacting to signal 3
Change-Id: I2b00e82af2ad0f09141dbf4e418bc0582e9b966d
diff --git a/src/debugger.cc b/src/debugger.cc
index 751efa1..f1e6066 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -1088,7 +1088,7 @@
if (thread == NULL) {
return false;
}
- StringAppendF(&name, "<%d> %s", thread->GetThinLockId(), thread->GetName()->ToModifiedUtf8().c_str());
+ StringAppendF(&name, "<%d> %s", thread->GetThinLockId(), thread->GetThreadName()->ToModifiedUtf8().c_str());
return true;
}
@@ -1873,7 +1873,7 @@
Dbg::DdmSendChunk(CHUNK_TYPE("THDE"), 4, buf);
} else {
CHECK(type == CHUNK_TYPE("THCR") || type == CHUNK_TYPE("THNM")) << type;
- SirtRef<String> name(t->GetName());
+ SirtRef<String> name(t->GetThreadName());
size_t char_count = (name.get() != NULL) ? name->GetLength() : 0;
const jchar* chars = name->GetCharArray()->GetData();