"Revert^4 "Make adbconnection start automatically for debuggable apps (on target)"
Needed to tell run-jdwp-tests.sh not to load adbconnection since it
might not be present.
This reverts commit fb57a6528d73e6ddbccf3049f08f6fa400e6dcd1.
Reason for revert: Added -XjdwpProvider:none to run-jdwp-tests.sh
Bug: 109505014
Test: ./art/tools/run-libjdwp-tests.sh
Change-Id: I43941f7048ae5b64c6cbe7a8e7c273d47596192c
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 1e327fc..7efd000 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1283,7 +1283,8 @@
dump_gc_performance_on_shutdown_ = runtime_options.Exists(Opt::DumpGCPerformanceOnShutdown);
jdwp_options_ = runtime_options.GetOrDefault(Opt::JdwpOptions);
- jdwp_provider_ = runtime_options.GetOrDefault(Opt::JdwpProvider);
+ jdwp_provider_ = CanonicalizeJdwpProvider(runtime_options.GetOrDefault(Opt::JdwpProvider),
+ IsJavaDebuggable());
switch (jdwp_provider_) {
case JdwpProvider::kNone: {
VLOG(jdwp) << "Disabling all JDWP support.";
@@ -1317,6 +1318,11 @@
constexpr const char* plugin_name = kIsDebugBuild ? "libadbconnectiond.so"
: "libadbconnection.so";
plugins_.push_back(Plugin::Create(plugin_name));
+ break;
+ }
+ case JdwpProvider::kUnset: {
+ LOG(FATAL) << "Illegal jdwp provider " << jdwp_provider_ << " was not filtered out!";
+ break;
}
}
callbacks_->AddThreadLifecycleCallback(Dbg::GetThreadLifecycleCallback());