diff -r 35e2bbea78b2 -r 21dfea980e23 src/hotspot/share/services/diagnosticCommand.hpp --- 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