src/hotspot/share/services/diagnosticCommand.hpp
changeset 52976 21dfea980e23
parent 50785 d1b24f2ceca5
child 53079 22295070fcd3
--- a/src/hotspot/share/services/diagnosticCommand.hpp	Wed Dec 12 12:00:02 2018 +0100
+++ b/src/hotspot/share/services/diagnosticCommand.hpp	Wed Dec 12 11:34:08 2018 +0000
@@ -867,4 +867,26 @@
   virtual void execute(DCmdSource source, TRAPS);
 };
 
+#if INCLUDE_JVMTI
+class DebugOnCmdStartDCmd : public DCmdWithParser {
+public:
+  DebugOnCmdStartDCmd(outputStream* output, bool heap);
+  static const char* name() {
+    return "VM.start_java_debugging";
+  }
+  static const char* description() {
+    return "Starts up the Java debugging if the jdwp agentlib was enabled with the option onjcmd=y.";
+  }
+  static const char* impact() {
+    return "High: Switches the VM into Java debug mode.";
+  }
+  static const JavaPermission permission() {
+    JavaPermission p = { "java.lang.management.ManagementPermission", "monitor", NULL };
+    return p;
+  }
+  static int num_arguments() { return 0; }
+  virtual void execute(DCmdSource source, TRAPS);
+};
+#endif // INCLUDE_JVMTI
+
 #endif // SHARE_VM_SERVICES_DIAGNOSTICCOMMAND_HPP