From c242df0540a0550c9af5dc33abd4bdcdac946e05 Mon Sep 17 00:00:00 2001 From: Jason Katonica Date: Tue, 6 Aug 2024 15:18:11 -0400 Subject: [PATCH 1/2] Tolerate OpenJCEPlus FIPS binaries with jlink When using `jlink` to create a JRE a user may make use of the `jlink` argument `--strip-debug`. This argument executes a strip to remove unnecessary symbols and information from a library to provide for a minimal footprint size of the runtime being created. This update skips performing any strip commands against the FIPS libraries contained in the `openjceplus` module. This is required since any changes to the FIPS libraries will cause a failure when loading the library since a self verification process is done when the FIPS library is loaded. Signed-off-by: Jason Katonica --- .../StripNativeDebugSymbolsPlugin.java | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java b/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java index d2f2307768d..542cd32ff69 100644 --- a/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java +++ b/src/jdk.jlink/linux/classes/jdk/tools/jlink/internal/plugins/StripNativeDebugSymbolsPlugin.java @@ -22,6 +22,11 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ package jdk.tools.jlink.internal.plugins; import java.io.InputStream; @@ -104,9 +109,7 @@ public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { stripBin); in.transformAndCopy((resource) -> { ResourcePoolEntry res = resource; - if ((resource.type() == ResourcePoolEntry.Type.NATIVE_LIB && - resource.path().endsWith(SHARED_LIBS_EXT)) || - resource.type() == ResourcePoolEntry.Type.NATIVE_CMD) { + if (shouldStrip(resource)) { Optional strippedBin = builder.build(resource); if (strippedBin.isPresent()) { StrippedDebugInfoBinary sb = strippedBin.get(); @@ -131,6 +134,35 @@ public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { return out.build(); } + /** + * Method to determine if a particular resource should be stripped. + * + * Particular paths are added here to handle libraries within the openjceplus module. + * The FIPS certified library located in the C/icc directory is sensitive to + * any modifications to the native library. Performing any modifications to the library + * in any way, causes the FIPS library to fail to load due to a self verification check made. + * + * @param resource the resource to examine for stripping eligibility + * @return return true if stripping should be done on a particular resource, false otherwise + */ + private static boolean shouldStrip(ResourcePoolEntry resource) { + switch (resource.type()) { + case NATIVE_CMD: + return true; + case NATIVE_LIB: + String path = resource.path(); + if (path.endsWith(SHARED_LIBS_EXT)) { + if (!(resource.moduleName().equals("openjceplus") && path.contains("/C/icc/"))) { + return true; + } + } + break; + default: + break; + } + return false; + } + private void logError(ResourcePoolEntry resource, String msgKey) { String msg = getMessage(msgKey, NAME, From 64aa5c7b4c9bfa4ab084d0e5a5b305a567029436 Mon Sep 17 00:00:00 2001 From: Mike Zhang Date: Mon, 19 Jun 2023 12:50:27 -0400 Subject: [PATCH 2/2] CRIU supports Java debugger during checkpoint and restore Added support for a VM_RESTORE JVMTI event; Added an additional command line option suspendOnRestore=[y|n] to determine if the VM restored from a checkpoint is to be suspended; -agentlib:jdwp=transport=dt_socket,server=y,suspend=[y|n] assumes suspendOnRestore=y; Always respect suspendOnRestore=n regardless the order of suspend and suspendOnRestore, both -agentlib:jdwp=transport=dt_socket,server=y,suspendOnRestore=n,suspend=y and -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,suspendOnRestore=n don't suspend the JVM post-restore. Signed-off-by: Mike Zhang Signed-off-by: Jason Feng --- closed/GensrcJ9JCL.gmk | 10 ++- .../com/sun/jdi/event/VMRestoreEvent.java | 50 +++++++++++ make/data/jdwp/jdwp.spec | 20 +++++ .../tools/example/debug/tty/EventHandler.java | 20 +++++ .../example/debug/tty/EventNotifier.java | 9 ++ .../com/sun/tools/example/debug/tty/TTY.java | 14 +++ .../tools/example/debug/tty/TTYResources.java | 9 ++ .../example/debug/tty/TTYResources_ja.java | 9 ++ .../example/debug/tty/TTYResources_zh_CN.java | 9 ++ .../com/sun/tools/jdi/EventSetImpl.java | 29 +++++++ .../share/native/libjdwp/debugInit.c | 86 ++++++++++++++++++- .../share/native/libjdwp/debugInit.h | 11 +++ .../share/native/libjdwp/eventFilter.c | 14 +++ .../share/native/libjdwp/eventHandler.c | 69 +++++++++++++++ .../share/native/libjdwp/eventHelper.c | 37 ++++++-- .../share/native/libjdwp/eventHelper.h | 9 +- .../share/native/libjdwp/threadControl.c | 50 +++++++++++ .../share/native/libjdwp/transport.c | 23 +++++ .../share/native/libjdwp/transport.h | 10 +++ .../share/native/libjdwp/util.c | 64 ++++++++++++++ .../share/native/libjdwp/util.h | 13 +++ 21 files changed, 557 insertions(+), 8 deletions(-) create mode 100644 closed/src/jdk.jdi/share/classes/com/sun/jdi/event/VMRestoreEvent.java diff --git a/closed/GensrcJ9JCL.gmk b/closed/GensrcJ9JCL.gmk index 1f63911def5..60156268f7d 100644 --- a/closed/GensrcJ9JCL.gmk +++ b/closed/GensrcJ9JCL.gmk @@ -1,5 +1,5 @@ # =========================================================================== -# (c) Copyright IBM Corp. 2020, 2023 All Rights Reserved +# (c) Copyright IBM Corp. 2020, 2024 All Rights Reserved # =========================================================================== # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as @@ -39,6 +39,7 @@ $(eval $(call SetupCopyFiles,COPY_OVERLAY_FILES, \ SRC := $(TOPDIR), \ DEST := $(SUPPORT_OUTPUTDIR)/overlay, \ FILES := \ + make/data/jdwp/jdwp.spec \ src/java.base/share/classes/com/sun/crypto/provider/HmacCore.java \ src/java.base/share/classes/java/lang/ClassValue.java \ src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java \ @@ -56,6 +57,13 @@ $(eval $(call SetupCopyFiles,COPY_OVERLAY_FILES, \ src/java.base/share/classes/sun/security/provider/SecureRandom.java \ src/java.base/unix/classes/java/lang/ProcessEnvironment.java \ src/java.base/unix/classes/sun/security/provider/NativePRNG.java \ + src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventHandler.java \ + src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventNotifier.java \ + src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java \ + src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java \ + src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java \ + src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java \ + src/jdk.jdi/share/classes/com/sun/tools/jdi/EventSetImpl.java \ )) IncludeIfUnsure := -includeIfUnsure -noWarnIncludeIf diff --git a/closed/src/jdk.jdi/share/classes/com/sun/jdi/event/VMRestoreEvent.java b/closed/src/jdk.jdi/share/classes/com/sun/jdi/event/VMRestoreEvent.java new file mode 100644 index 00000000000..f9da42c07d1 --- /dev/null +++ b/closed/src/jdk.jdi/share/classes/com/sun/jdi/event/VMRestoreEvent.java @@ -0,0 +1,50 @@ +/*[INCLUDE-IF CRIU_SUPPORT]*/ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2024 All Rights Reserved + * =========================================================================== + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * IBM designates this particular file as subject to the "Classpath" exception + * as provided by IBM in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, see . + * + * =========================================================================== + */ +package com.sun.jdi.event; + +import com.sun.jdi.ThreadReference; +import com.sun.jdi.VirtualMachine; + +/** + * Notification of when the VM is restored from a checkpoint. Similar to + * VMStartEvent this occurs before application code has run, including any + * application hooks for the restore event. + * The event is generated even if not explicitly requested. + * + * @see VMStartEvent + * @see VMDeathEvent + * @see EventQueue + * @see VirtualMachine + */ +public interface VMRestoreEvent extends Event { + + /** + * Returns the thread which is restoring the VM from a checkpoint. + * + * @return a {@link ThreadReference} representing the restore thread + * on the target VM. + */ + public ThreadReference thread(); +} diff --git a/make/data/jdwp/jdwp.spec b/make/data/jdwp/jdwp.spec index 51fe13cd9ef..8b10550308e 100644 --- a/make/data/jdwp/jdwp.spec +++ b/make/data/jdwp/jdwp.spec @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2024 All Rights Reserved + * =========================================================================== + */ + JDWP "Java(tm) Debug Wire Protocol" (CommandSet VirtualMachine=1 (Command Version=1 @@ -3090,6 +3096,17 @@ JDWP "Java(tm) Debug Wire Protocol" (int requestID "Request that generated event") ) +/*[IF CRIU_SUPPORT]*/ + (Alt VMRestore=JDWP.EventKind.VM_RESTORE + "Notification of when the VM is restored from a checkpoint. Similar to" + "VMStartEvent this occurs before application code has run, including any" + "application hooks for the restore event." + "The event is generated even if not explicitly requested." + + (int requestID "Request that generated event") + (threadObject thread "The thread restoring the VM from a checkpoint.") + ) +/*[ENDIF] CRIU_SUPPORT */ ) ) ) @@ -3219,6 +3236,9 @@ JDWP "Java(tm) Debug Wire Protocol" (Constant VM_INIT =90 "obsolete - was used in jvmdi") (Constant VM_DEATH =99 ) (Constant VM_DISCONNECTED =100 "Never sent across JDWP") +/*[IF CRIU_SUPPORT]*/ + (Constant VM_RESTORE =101 "OpenJ9 VM Restored") +/*[ENDIF] CRIU_SUPPORT */ ) (ConstantSet ThreadStatus diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventHandler.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventHandler.java index cd416ccf24e..4f25e7cd2f3 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventHandler.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventHandler.java @@ -31,6 +31,11 @@ * this sample code. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2024 All Rights Reserved + * =========================================================================== + */ package com.sun.tools.example.debug.tty; @@ -118,6 +123,10 @@ private boolean handleEvent(Event event) { return threadDeathEvent(event); } else if (event instanceof VMStartEvent) { return vmStartEvent(event); +/*[IF CRIU_SUPPORT]*/ + } else if (event instanceof VMRestoreEvent restoreEvent) { + return vmRestoreEvent(restoreEvent); +/*[ENDIF] CRIU_SUPPORT */ } else { return handleExitEvent(event); } @@ -179,6 +188,10 @@ private ThreadReference eventThread(Event event) { return ((ThreadDeathEvent)event).thread(); } else if (event instanceof VMStartEvent) { return ((VMStartEvent)event).thread(); +/*[IF CRIU_SUPPORT]*/ + } else if (event instanceof VMRestoreEvent restoreEvent) { + return restoreEvent.thread(); +/*[ENDIF] CRIU_SUPPORT */ } else { return null; } @@ -210,6 +223,13 @@ private boolean vmStartEvent(Event event) { return stopOnVMStart; } +/*[IF CRIU_SUPPORT]*/ + private boolean vmRestoreEvent(VMRestoreEvent restoreEvent) { + notifier.vmRestoreEvent(restoreEvent); + return stopOnVMStart; + } +/*[ENDIF] CRIU_SUPPORT */ + private boolean breakpointEvent(Event event) { BreakpointEvent be = (BreakpointEvent)event; notifier.breakpointEvent(be); diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventNotifier.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventNotifier.java index 1a0ee622059..cb20ebe8b69 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventNotifier.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/EventNotifier.java @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2024 All Rights Reserved + * =========================================================================== + */ + /* * This source code is provided to illustrate the usage of a given feature * or technique and has been deliberately simplified. Additional steps @@ -38,6 +44,9 @@ interface EventNotifier { void vmStartEvent(VMStartEvent e); +/*[IF CRIU_SUPPORT]*/ + void vmRestoreEvent(VMRestoreEvent e); +/*[ENDIF] CRIU_SUPPORT */ void vmDeathEvent(VMDeathEvent e); void vmDisconnectEvent(VMDisconnectEvent e); diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java index f6bd858d9be..f3455dfdfc0 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2024 All Rights Reserved + * =========================================================================== + */ + /* * This source code is provided to illustrate the usage of a given feature * or technique and has been deliberately simplified. Additional steps @@ -73,6 +79,14 @@ public void vmStartEvent(VMStartEvent se) { MessageOutput.lnprint("VM Started:"); } +/*[IF CRIU_SUPPORT]*/ + @Override + public void vmRestoreEvent(VMRestoreEvent re) { + Thread.yield(); // fetch output + MessageOutput.lnprint("VM Restored:"); + } +/*[ENDIF] CRIU_SUPPORT */ + @Override public void vmDeathEvent(VMDeathEvent e) { } diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java index 5f773288e5e..685ab85ee49 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources.java @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2024 All Rights Reserved + * =========================================================================== + */ + /* * This source code is provided to illustrate the usage of a given feature * or technique and has been deliberately simplified. Additional steps @@ -484,6 +490,9 @@ public Object[][] getContents() { " are the arguments passed to the main() method of \n" + "\n" + "For command help type ''help'' at {0} prompt"}, +/*[IF CRIU_SUPPORT]*/ + {"VM Restored:", "VM restored from checkpoint:"}, +/*[ENDIF] CRIU_SUPPORT */ // END OF MATERIAL TO LOCALIZE }; diff --git a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java index af4a782e85a..a9a1a127d1b 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java @@ -23,6 +23,12 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2023, 2024 All Rights Reserved + * =========================================================================== + */ + /* * This source code is provided to illustrate the usage of a given feature * or technique and has been deliberately simplified. Additional steps @@ -338,6 +344,9 @@ public Object[][] getContents() { "** \u30B3\u30DE\u30F3\u30C9\u30FB\u30EA\u30B9\u30C8 **\nconnectors -- \u3053\u306EVM\u5185\u306E\u4F7F\u7528\u53EF\u80FD\u306A\u30B3\u30CD\u30AF\u30BF\u3068\u30C8\u30E9\u30F3\u30B9\u30DD\u30FC\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\nrun [class [args]] -- \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u5B9F\u884C\u3092\u958B\u59CB\u3057\u307E\u3059\n\nthreads [threadgroup] -- \u30B9\u30EC\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\nthread -- \u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30B9\u30EC\u30C3\u30C9\u3092\u8A2D\u5B9A\u3057\u307E\u3059\nsuspend [thread id(s)] -- \u30B9\u30EC\u30C3\u30C9\u3092\u4E2D\u65AD\u3057\u307E\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8: \u3059\u3079\u3066)\nresume [thread id(s)] -- \u30B9\u30EC\u30C3\u30C9\u3092\u518D\u958B\u3057\u307E\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8: \u3059\u3079\u3066)\nwhere [ | all] -- \u30B9\u30EC\u30C3\u30C9\u306E\u30B9\u30BF\u30C3\u30AF\u3092\u30C0\u30F3\u30D7\u3057\u307E\u3059\nwherei [ | all]-- \u30B9\u30EC\u30C3\u30C9\u306E\u30B9\u30BF\u30C3\u30AF\u3092pc\u60C5\u5831\u3068\u3068\u3082\u306B\u30C0\u30F3\u30D7\u3057\u307E\u3059\nup [n frames] -- \u30B9\u30EC\u30C3\u30C9\u306E\u30B9\u30BF\u30C3\u30AF\u3092\u4E0A\u306B\u79FB\u52D5\u3057\u307E\u3059\ndown [n frames] -- \u30B9\u30EC\u30C3\u30C9\u306E\u30B9\u30BF\u30C3\u30AF\u3092\u4E0B\u306B\u79FB\u52D5\u3057\u307E\u3059\nkill -- \u6307\u5B9A\u3055\u308C\u305F\u4F8B\u5916\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3067\u30B9\u30EC\u30C3\u30C9\u3092\u5F37\u5236\u7D42\u4E86\u3057\u307E\u3059\ninterrupt -- \u30B9\u30EC\u30C3\u30C9\u3092\u4E2D\u65AD\u3057\u307E\u3059\n\nprint -- \u5F0F\u306E\u5024\u3092\u51FA\u529B\u3057\u307E\u3059\ndump -- \u3059\u3079\u3066\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u60C5\u5831\u3092\u51FA\u529B\u3057\u307E\u3059\neval -- \u5F0F\u3092\u8A55\u4FA1\u3057\u307E\u3059(print\u3068\u540C\u3058)\nset = -- \u65B0\u3057\u3044\u5024\u3092\u30D5\u30A3\u30FC\u30EB\u30C9/\u5909\u6570/\u914D\u5217\u8981\u7D20\u306B\u4EE3\u5165\u3057\u307E\u3059\nlocals -- \u73FE\u5728\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30D5\u30EC\u30FC\u30E0\u5185\u306E\u3059\u3079\u3066\u306E\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u3092\u51FA\u529B\u3057\u307E\u3059\n\nclasses -- \u73FE\u5728\u65E2\u77E5\u306E\u30AF\u30E9\u30B9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\nclass -- \u6307\u5B9A\u3057\u305F\u30AF\u30E9\u30B9\u306E\u8A73\u7D30\u3092\u8868\u793A\u3057\u307E\u3059\nmethods -- \u30AF\u30E9\u30B9\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\nfields -- \u30AF\u30E9\u30B9\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\n\nthreadgroups -- \u30B9\u30EC\u30C3\u30C9\u30B0\u30EB\u30FC\u30D7\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\nthreadgroup -- \u73FE\u5728\u306E\u30B9\u30EC\u30C3\u30C9\u30B0\u30EB\u30FC\u30D7\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n\nstop [go|thread] [] \n -- \u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n -- \u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u3001\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u306E\u73FE\u5728\u306E\u30EA\u30B9\u30C8\u304C\u51FA\u529B\u3055\u308C\u307E\u3059\n -- \"go\"\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u505C\u6B62\u5F8C\u3059\u3050\u306B\u518D\u958B\u3057\u307E\u3059\n -- \"thread\"\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u505C\u6B62\u3057\u305F\u30B9\u30EC\u30C3\u30C9\u306E\u307F\u4E2D\u65AD\u3057\u307E\u3059\n -- \"go\"\u3082\"thread\"\u3082\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u3001\u3059\u3079\u3066\u306E\u30B9\u30EC\u30C3\u30C9\u3092\u4E2D\u65AD\u3057\u307E\u3059\n -- \u6574\u6570\u306E\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u6307\u5B9A\u3055\u308C\u305F\u30B9\u30EC\u30C3\u30C9\u3067\u306E\u307F\u505C\u6B62\u3057\u307E\u3059\n -- \"at\"\u3068\"in\"\u306F\u540C\u3058\u610F\u5473\u3092\u6301\u3061\u307E\u3059\n -- \u306F\u884C\u756A\u53F7\u307E\u305F\u306F\u30E1\u30BD\u30C3\u30C9\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059:\n -- :\n -- .[(argument_type,...)]\nclear .[(argument_type,...)]\n -- \u30E1\u30BD\u30C3\u30C9\u5185\u306E\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u30AF\u30EA\u30A2\u3057\u307E\u3059\nclear : -- \u884C\u306E\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u30AF\u30EA\u30A2\u3057\u307E\u3059\nclear -- \u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\ncatch [uncaught|caught|all] |\n -- \u6307\u5B9A\u3055\u308C\u305F\u4F8B\u5916\u304C\u767A\u751F\u3057\u305F\u3068\u304D\u306B\u30D6\u30EC\u30FC\u30AF\u3057\u307E\u3059\nignore [uncaught|caught|all] |\n -- \u6307\u5B9A\u3055\u308C\u305F\u4F8B\u5916\u306E'catch'\u3092\u53D6\u308A\u6D88\u3057\u307E\u3059\nwatch [access|all] .\n -- \u30D5\u30A3\u30FC\u30EB\u30C9\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u307E\u305F\u306F\u5909\u66F4\u3092\u30A6\u30A9\u30C3\u30C1\u3057\u307E\u3059\nunwatch [access|all] .\n -- \u30D5\u30A3\u30FC\u30EB\u30C9\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u307E\u305F\u306F\u5909\u66F4\u306E\u30A6\u30A9\u30C3\u30C1\u3092\u4E2D\u6B62\u3057\u307E\u3059\ntrace [go] methods [thread]\n -- \u30E1\u30BD\u30C3\u30C9\u306E\u5165\u308A\u53E3\u3068\u51FA\u53E3\u3092\u30C8\u30EC\u30FC\u30B9\u3057\u307E\u3059\u3002\n -- 'go'\u304C\u6307\u5B9A\u3055\u308C\u308B\u307E\u3067\u3059\u3079\u3066\u306E\u30B9\u30EC\u30C3\u30C9\u306F\u4E2D\u65AD\u3057\u307E\u3059\ntrace [go] method exit | exits [thread]\n -- \u73FE\u5728\u306E\u30E1\u30BD\u30C3\u30C9\u306E\u51FA\u53E3\u307E\u305F\u306F\u3059\u3079\u3066\u306E\u30E1\u30BD\u30C3\u30C9\u306E\u51FA\u53E3\u3092\u30C8\u30EC\u30FC\u30B9\u3057\u307E\u3059\n -- 'go'\u304C\u6307\u5B9A\u3055\u308C\u308B\u307E\u3067\u3059\u3079\u3066\u306E\u30B9\u30EC\u30C3\u30C9\u306F\u4E2D\u65AD\u3057\u307E\u3059\nuntrace [methods] -- \u30E1\u30BD\u30C3\u30C9\u306E\u958B\u59CB\u307E\u305F\u306F\u7D42\u4E86\u306E\u30C8\u30EC\u30FC\u30B9\u3092\u505C\u6B62\u3057\u307E\u3059\nstep -- \u73FE\u5728\u306E\u884C\u3092\u5B9F\u884C\u3057\u307E\u3059\nstep up -- \u73FE\u5728\u306E\u30E1\u30BD\u30C3\u30C9\u304C\u30E1\u30BD\u30C3\u30C9\u306E\u547C\u51FA\u3057\u5143\u306B\u623B\u308B\u307E\u3067\u5B9F\u884C\u3057\u307E\u3059\nstepi -- \u73FE\u5728\u306E\u547D\u4EE4\u3092\u5B9F\u884C\u3057\u307E\u3059\nnext -- 1\u884C\u3092\u30B9\u30C6\u30C3\u30D7\u5B9F\u884C\u3057\u307E\u3059(\u547C\u51FA\u3057\u3092\u30B9\u30C6\u30C3\u30D7\u30AA\u30FC\u30D0\u30FC)\ncont -- \u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u304B\u3089\u5B9F\u884C\u3092\u7D9A\u884C\u3057\u307E\u3059\n\nlist [line number|method] -- \u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u3092\u51FA\u529B\u3057\u307E\u3059\nuse (or sourcepath) [source file path]\n -- \u30BD\u30FC\u30B9\u30FB\u30D1\u30B9\u3092\u8868\u793A\u307E\u305F\u306F\u5909\u66F4\u3057\u307E\u3059\nexclude [, ... | \"none\"]\n -- \u6307\u5B9A\u3057\u305F\u30AF\u30E9\u30B9\u306E\u30B9\u30C6\u30C3\u30D7\u3084\u30E1\u30BD\u30C3\u30C9\u30FB\u30A4\u30D9\u30F3\u30C8\u3092\u5831\u544A\u3057\u307E\u305B\u3093\nclasspath -- \u30BF\u30FC\u30B2\u30C3\u30C8VM\u304B\u3089\u30AF\u30E9\u30B9\u30D1\u30B9\u60C5\u5831\u3092\u51FA\u529B\u3057\u307E\u3059\n\nmonitor -- \u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u505C\u6B62\u3059\u308B\u305F\u3073\u306B\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3057\u307E\u3059\nmonitor -- \u30E2\u30CB\u30BF\u30FC\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\nunmonitor -- \u30E2\u30CB\u30BF\u30FC\u3092\u524A\u9664\u3057\u307E\u3059\nread -- \u30B3\u30DE\u30F3\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u53D6\u3063\u3066\u5B9F\u884C\u3057\u307E\u3059\n\nlock -- \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u30ED\u30C3\u30AF\u60C5\u5831\u3092\u51FA\u529B\u3057\u307E\u3059\nthreadlocks [thread id] -- \u30B9\u30EC\u30C3\u30C9\u306E\u30ED\u30C3\u30AF\u60C5\u5831\u3092\u51FA\u529B\u3057\u307E\u3059\n\npop -- \u73FE\u5728\u306E\u30D5\u30EC\u30FC\u30E0\u307E\u3067\u306E\u3059\u3079\u3066\u306E\u30B9\u30BF\u30C3\u30AF\u3092\u30DD\u30C3\u30D7\u3057\u307E\u3059\nreenter -- pop\u3068\u540C\u3058\u3067\u3059\u304C\u3001\u73FE\u5728\u306E\u30D5\u30EC\u30FC\u30E0\u304C\u518D\u5165\u529B\u3055\u308C\u307E\u3059\nredefine \n -- \u30AF\u30E9\u30B9\u306E\u30B3\u30FC\u30C9\u3092\u518D\u5B9A\u7FA9\u3057\u307E\u3059\n\ndisablegc -- \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u6291\u5236\u3057\u307E\u3059\nenablegc -- \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u8A31\u53EF\u3057\u307E\u3059\n\n!! -- \u6700\u5F8C\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u7E70\u308A\u8FD4\u3057\u307E\u3059\n -- \u30B3\u30DE\u30F3\u30C9\u3092n\u56DE\u7E70\u308A\u8FD4\u3057\u307E\u3059\n# -- \u7834\u68C4\u3057\u307E\u3059(\u64CD\u4F5C\u306A\u3057)\nhelp (\u307E\u305F\u306F?) -- \u30B3\u30DE\u30F3\u30C9\u3092\u30EA\u30B9\u30C8\u3057\u307E\u3059\ndbgtrace [flag] -- dbgtrace\u30B3\u30DE\u30F3\u30C9\u30FB\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u540C\u3058\u3067\u3059\nversion -- \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3057\u307E\u3059\nexit (\u307E\u305F\u306Fquit) -- \u30C7\u30D0\u30C3\u30AC\u3092\u7D42\u4E86\u3057\u307E\u3059\n\n: \u30D1\u30C3\u30B1\u30FC\u30B8\u4FEE\u98FE\u5B50\u3092\u542B\u3080\u5B8C\u5168\u30AF\u30E9\u30B9\u540D\n: \u5148\u982D\u307E\u305F\u306F\u672B\u5C3E\u306E\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9('*')\u3092\u542B\u3080\u30AF\u30E9\u30B9\u540D\n: 'threads'\u30B3\u30DE\u30F3\u30C9\u3067\u5831\u544A\u3055\u308C\u308B\u30B9\u30EC\u30C3\u30C9\u756A\u53F7\n: Java(TM)\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u306E\u5F0F\u3002\n\u307B\u3068\u3093\u3069\u306E\u4E00\u822C\u7684\u306A\u69CB\u6587\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n\n\u8D77\u52D5\u30B3\u30DE\u30F3\u30C9\u306F\u3001\"jdb.ini\"\u307E\u305F\u306F\".jdbrc\"\u306B\u914D\u7F6E\u3067\u304D\u307E\u3059\n(user.home\u307E\u305F\u306Fuser.dir\u5185)"}, {"zz usage text", "\u4F7F\u7528\u65B9\u6CD5: {0} \n\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n -? -h --help -help \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n -sourcepath \n \u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n -attach
\n \u6A19\u6E96\u30B3\u30CD\u30AF\u30BF\u3092\u4F7F\u7528\u3057\u3066\u3001\u6307\u5B9A\u3055\u308C\u305F\u30A2\u30C9\u30EC\u30B9\u3067\u5B9F\u884C\u4E2D\u306EVM\u306B\u63A5\u7D9A\u3059\u308B\n -listen
\n \u6A19\u6E96\u30B3\u30CD\u30AF\u30BF\u3092\u4F7F\u7528\u3057\u3066\u3001\u6307\u5B9A\u3055\u308C\u305F\u30A2\u30C9\u30EC\u30B9\u3067\u5B9F\u884C\u4E2D\u306EVM\u306E\u63A5\u7D9A\u3092\u5F85\u6A5F\u3059\u308B\n -listenany\n \u6A19\u6E96\u30B3\u30CD\u30AF\u30BF\u3092\u4F7F\u7528\u3057\u3066\u3001\u4F7F\u7528\u53EF\u80FD\u306A\u4EFB\u610F\u306E\u30A2\u30C9\u30EC\u30B9\u3067\u5B9F\u884C\u4E2D\u306EVM\u306E\u63A5\u7D9A\u3092\u5F85\u6A5F\u3059\u308B\n -launch\n ''run''\u30B3\u30DE\u30F3\u30C9\u3092\u5F85\u6A5F\u305B\u305A\u306BVM\u3092\u5373\u6642\u306B\u8D77\u52D5\u3059\u308B\n -listconnectors \u3053\u306EVM\u3067\u4F7F\u7528\u53EF\u80FD\u306A\u30B3\u30CD\u30AF\u30BF\u3092\u30EA\u30B9\u30C8\u3059\u308B\n -connect :=,...\n \u6307\u5B9A\u3055\u308C\u305F\u30B3\u30CD\u30AF\u30BF\u3092\u4F7F\u7528\u3057\u3066\u3001\u30EA\u30B9\u30C8\u3055\u308C\u305F\u5F15\u6570\u5024\u3067\u30BF\u30FC\u30B2\u30C3\u30C8VM\u306B\u63A5\u7D9A\u3059\u308B\n -dbgtrace [flags] {0}\u306E\u30C7\u30D0\u30C3\u30B0\u306E\u60C5\u5831\u3092\u51FA\u529B\u3059\u308B\n -tclient \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092HotSpot(TM) Client Compiler\u3067\u5B9F\u884C\u3059\u308B\n -tserver \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092HotSpot(TM) Server Compiler\u3067\u5B9F\u884C\u3059\u308B\n\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9\u306B\u8EE2\u9001\u3055\u308C\u307E\u3059:\n -v -verbose[:class|gc|jni]\n \u8A73\u7D30\u30E2\u30FC\u30C9\u3092\u30AA\u30F3\u306B\u3059\u308B\n -D= \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n -classpath \n \u30AF\u30E9\u30B9\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u30EA\u30B9\u30C8\u3059\u308B\n -X