Notify the debugger of class preparation.

Change-Id: Ic9863d0cc1176c474df2239a286a01393845d589
diff --git a/src/debugger.cc b/src/debugger.cc
index df55f4e..5840655 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -849,7 +849,7 @@
     MethodHelper mh(m);
     expandBufAddMethodId(pReply, ToMethodId(m));
     expandBufAddUtf8String(pReply, mh.GetName());
-    expandBufAddUtf8String(pReply, mh.GetSignature().c_str());
+    expandBufAddUtf8String(pReply, mh.GetSignature());
     if (with_generic) {
       static const char genericSignature[1] = "";
       expandBufAddUtf8String(pReply, genericSignature);
@@ -1436,6 +1436,7 @@
   if (!gDebuggerActive) {
     return;
   }
+
   JDWP::JdwpLocation throw_location;
   SetLocation(throw_location, throwMethod, throwNativePc);
   JDWP::JdwpLocation catch_location;
@@ -1461,7 +1462,16 @@
 }
 
 void Dbg::PostClassPrepare(Class* c) {
-  UNIMPLEMENTED(FATAL);
+  if (!gDebuggerActive) {
+    return;
+  }
+
+  // TODO - we currently always send both "verified" and "prepared" since
+  // debuggers seem to like that.  There might be some advantage to honesty,
+  // since the class may not yet be verified.
+  int state = JDWP::CS_VERIFIED | JDWP::CS_PREPARED;
+  JDWP::JdwpTypeTag tag = c->IsInterface() ? JDWP::TT_INTERFACE : JDWP::TT_CLASS;
+  gJdwpState->PostClassPrepare(tag, gRegistry->Add(c), ClassHelper(c).GetDescriptor(), state);
 }
 
 bool Dbg::WatchLocation(const JDWP::JdwpLocation* pLoc) {
@@ -1612,6 +1622,7 @@
     m = pReq->class_->FindVirtualMethodForVirtualOrInterface(pReq->method_);
   }
   CHECK(m != NULL);
+  LOG(VERBOSE) << "ExecuteMethod " << PrettyMethod(m);
 
   CHECK_EQ(sizeof(jvalue), sizeof(uint64_t));