diff options
Diffstat (limited to 'runtime/debugger.cc')
| -rw-r--r-- | runtime/debugger.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index ae57aa34ec..57bd57e61f 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -674,15 +674,15 @@ JDWP::JdwpError Dbg::GetMonitorInfo(JDWP::ObjectId object_id, JDWP::ExpandBuf* r Locks::mutator_lock_->ExclusiveUnlock(self); Locks::mutator_lock_->SharedLock(self); - if (monitor_info.owner != NULL) { - expandBufAddObjectId(reply, gRegistry->Add(monitor_info.owner->GetPeer())); + if (monitor_info.owner_ != NULL) { + expandBufAddObjectId(reply, gRegistry->Add(monitor_info.owner_->GetPeer())); } else { expandBufAddObjectId(reply, gRegistry->Add(NULL)); } - expandBufAdd4BE(reply, monitor_info.entry_count); - expandBufAdd4BE(reply, monitor_info.waiters.size()); - for (size_t i = 0; i < monitor_info.waiters.size(); ++i) { - expandBufAddObjectId(reply, gRegistry->Add(monitor_info.waiters[i]->GetPeer())); + expandBufAdd4BE(reply, monitor_info.entry_count_); + expandBufAdd4BE(reply, monitor_info.waiters_.size()); + for (size_t i = 0; i < monitor_info.waiters_.size(); ++i) { + expandBufAddObjectId(reply, gRegistry->Add(monitor_info.waiters_[i]->GetPeer())); } return JDWP::ERR_NONE; } @@ -1935,7 +1935,8 @@ JDWP::JdwpError Dbg::SuspendThread(JDWP::ObjectId thread_id, bool request_suspen } // Suspend thread to build stack trace. bool timed_out; - Thread* thread = Thread::SuspendForDebugger(peer.get(), request_suspension, &timed_out); + Thread* thread = ThreadList::SuspendThreadByPeer(peer.get(), request_suspension, true, + &timed_out); if (thread != NULL) { return JDWP::ERR_NONE; } else if (timed_out) { @@ -2412,7 +2413,8 @@ class ScopedThreadSuspension { soa.Self()->TransitionFromRunnableToSuspended(kWaitingForDebuggerSuspension); jobject thread_peer = gRegistry->GetJObject(thread_id); bool timed_out; - Thread* suspended_thread = Thread::SuspendForDebugger(thread_peer, true, &timed_out); + Thread* suspended_thread = ThreadList::SuspendThreadByPeer(thread_peer, true, true, + &timed_out); CHECK_EQ(soa.Self()->TransitionFromSuspendedToRunnable(), kWaitingForDebuggerSuspension); if (suspended_thread == NULL) { // Thread terminated from under us while suspending. @@ -3012,7 +3014,7 @@ void Dbg::DdmSendThreadNotification(Thread* t, uint32_t type) { if (type == CHUNK_TYPE("THDE")) { uint8_t buf[4]; - JDWP::Set4BE(&buf[0], t->GetThinLockId()); + JDWP::Set4BE(&buf[0], t->GetThreadId()); Dbg::DdmSendChunk(CHUNK_TYPE("THDE"), 4, buf); } else { CHECK(type == CHUNK_TYPE("THCR") || type == CHUNK_TYPE("THNM")) << type; @@ -3022,7 +3024,7 @@ void Dbg::DdmSendThreadNotification(Thread* t, uint32_t type) { const jchar* chars = (name.get() != NULL) ? name->GetCharArray()->GetData() : NULL; std::vector<uint8_t> bytes; - JDWP::Append4BE(bytes, t->GetThinLockId()); + JDWP::Append4BE(bytes, t->GetThreadId()); JDWP::AppendUtf16BE(bytes, chars, char_count); CHECK_EQ(bytes.size(), char_count*2 + sizeof(uint32_t)*2); Dbg::DdmSendChunk(type, bytes); @@ -3545,7 +3547,7 @@ void Dbg::RecordAllocation(mirror::Class* type, size_t byte_count) { AllocRecord* record = &recent_allocation_records_[gAllocRecordHead]; record->type = type; record->byte_count = byte_count; - record->thin_lock_id = self->GetThinLockId(); + record->thin_lock_id = self->GetThreadId(); // Fill in the stack trace. AllocRecordStackVisitor visitor(self, record); |
