Notify the debugger of class preparation.

Change-Id: Ic9863d0cc1176c474df2239a286a01393845d589
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 0dab1ff..e32f8a5 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -9,6 +9,7 @@
 
 #include "casts.h"
 #include "class_loader.h"
+#include "debugger.h"
 #include "dex_cache.h"
 #include "dex_file.h"
 #include "dex_verifier.h"
@@ -1111,6 +1112,20 @@
     return NULL;
   }
   CHECK(klass->IsResolved());
+
+  /*
+   * We send CLASS_PREPARE events to the debugger from here.  The
+   * definition of "preparation" is creating the static fields for a
+   * class and initializing them to the standard default values, but not
+   * executing any code (that comes later, during "initialization").
+   *
+   * We did the static preparation in LinkClass.
+   *
+   * The class has been prepared and resolved but possibly not yet verified
+   * at this point.
+   */
+  Dbg::PostClassPrepare(klass.get());
+
   return klass.get();
 }