ART: Add JDWP trace to see how agent is attached
Tested with visual inspection of logcat following command:
adb root && \
adb shell stop && \
adb shell setprop dalvik.vm.extra-opts "-verbose:jdwp" &&\
adb shell start
Test: See above
Change-Id: I52c17f1b7b962d37d666e27abbc33b2b83fd9980
diff --git a/adbconnection/adbconnection.cc b/adbconnection/adbconnection.cc
index d0dde29..de6f6fc 100644
--- a/adbconnection/adbconnection.cc
+++ b/adbconnection/adbconnection.cc
@@ -814,8 +814,12 @@
void AdbConnectionState::AttachJdwpAgent(art::Thread* self) {
art::Runtime* runtime = art::Runtime::Current();
self->AssertNoPendingException();
+
+ std::string args = MakeAgentArg();
+ VLOG(jdwp) << "Attaching JDWP agent with args '" << args << "'";
+
runtime->AttachAgent(/* env= */ nullptr,
- MakeAgentArg(),
+ args,
/* class_loader= */ nullptr);
if (self->IsExceptionPending()) {
LOG(ERROR) << "Failed to load agent " << agent_name_;