Fixed debugger for threads attached from JNI
Dbg::PostThreadStart was not invoked in Thread::Attach,
thus when attaching existing native thread to JNI, JDWP
events from that thread are not handled correctly by the
debugger, because the thread keeps being unannounced.
The issue was reproduced on Eclipse 4.3 and 4.4.
Change-Id: I9a330f5cb96857862b18f37047ef87646a1f2aa2
Signed-off-by: Daniel Mihalyi <daniel.mihalyi@mattakis.com>
diff --git a/runtime/thread.cc b/runtime/thread.cc
index efe27ee..3d95349 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -409,6 +409,11 @@
}
}
+ {
+ ScopedObjectAccess soa(self);
+ Dbg::PostThreadStart(self);
+ }
+
return self;
}