Add property-changing JVMTI agent wrapper.
Adds libwrapagentproperties agent that allows one to change or add to
the system properties observed by a JVMTI agent. This is useful for
compatibility as some JVMTI agents expect to be able to find system
properties that are not present in ART. With this we can run them
without having to modify the runtime itself.
Also adds a --agent-wrapper flag to run-jdwp-tests.sh to facilitate
the use of this agent.
Test: mma -j40 libwrapagentproperties
Test: ./art/tools/run-jdwp-tests.sh \
--mode=host \
--variant=x64 \
-Xplugin:$ANDROID_HOST_OUT/lib64/libopenjdkjvmtid.so \
--jdwp-path /usr/lib/jvm/default-java/jre/lib/amd64/libjdwp.so \
--agent-wrapper $ANDROID_HOST_OUT/lib64/libwrapagentproperties.so=$PWD/art/tools/libjdwp-compat.props
Change-Id: Ic5eef7e9b4b8c54f4b0683dbb4e71768cbf4f97c
diff --git a/tools/libjdwp-compat.props b/tools/libjdwp-compat.props
new file mode 100644
index 0000000..c573b24
--- /dev/null
+++ b/tools/libjdwp-compat.props
@@ -0,0 +1,18 @@
+# Copyright 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# These are properties that are needed for RI jdwp to run.
+java.vm.info=mixed mode
+sun.boot.class.path=
+sun.boot.library.path=