Fix detaching a debugger while threads are suspended.
The interesting part of this change is in "thread_list.cc".
I've done a TODO in TagFromClass, but haven't seen it make any practical
difference in a debugger. I also tightened up the types in GetThreadStatus
while investigating the fact that we report some threads as "RUNNING, SUSPENDED",
which makes no sense until you realize that TS_RUNNING corresponds to both
our kRunnable thread state and our kNative thread state, the latter of which
may actually be a suspended thread.
I've also made us fail faster in the "address in use" jdwp failure case,
and tidied up a bunch of the capitalization in logging.
Change-Id: I0fe705791d07db31c4615addce44da4fdfbfd0d1
diff --git a/src/thread.cc b/src/thread.cc
index cc6c7e8..0a23d46 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -348,7 +348,7 @@
stack_base_ = reinterpret_cast<byte*>(temp_stack_base);
if (stack_size_ <= kStackOverflowReservedBytes) {
- LOG(FATAL) << "attempt to attach a thread with a too-small stack (" << stack_size_ << " bytes)";
+ LOG(FATAL) << "Attempt to attach a thread with a too-small stack (" << stack_size_ << " bytes)";
}
// Set stack_end_ to the bottom of the stack saving space of stack overflows
@@ -676,7 +676,7 @@
// Double-check the TLS slot allocation.
if (pthread_getspecific(pthread_key_self_) != NULL) {
- LOG(FATAL) << "newly-created pthread TLS slot is not NULL";
+ LOG(FATAL) << "Newly-created pthread TLS slot is not NULL";
}
}