diff --git a/test/hotspot/jtreg/serviceability/dcmd/framework/TestProcessLauncher.java b/test/hotspot/jtreg/serviceability/dcmd/framework/TestProcessLauncher.java index ec41c8b10de..5c8d8c9df65 100644 --- a/test/hotspot/jtreg/serviceability/dcmd/framework/TestProcessLauncher.java +++ b/test/hotspot/jtreg/serviceability/dcmd/framework/TestProcessLauncher.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,7 +65,7 @@ public Process launch() { String cmd = prepareLaunch(java, argHandler.getPipePort()); - Debugee debuggee = binder.startLocalDebugee(cmd); + Debugee debuggee = binder.startDebugee(cmd); debuggee.redirectOutput(log); String line = pipe.readln(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001.java index fe24c654361..93b4c542f75 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -105,7 +105,7 @@ private int runIt(String argv[], PrintStream out) { Binder binder = new Binder(argHandler, log); log.display("command: " + cmd); - Debugee debugee = binder.startLocalDebugee(cmd); + Debugee debugee = binder.startDebugee(cmd); JDWP.ListenAddress listenAddress = debugee.redirectOutputAndDetectListeningAddress(log); String port = listenAddress.address(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002.java index 4b5fd75a88c..9132b986a07 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -110,7 +110,7 @@ private int runIt(String argv[], PrintStream out) { Binder binder = new Binder(argHandler, log); log.display("command: " + cmd); - Debugee debugee = binder.startLocalDebugee(cmd); + Debugee debugee = binder.startDebugee(cmd); debugee.redirectOutput(log); if ((vm = attachTarget(name)) == null) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001.java index facfe9c2c48..46b8eab14b9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attachnosuspend/attachnosuspend001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -105,7 +105,7 @@ private int runIt(String argv[], PrintStream out) { Binder binder = new Binder(argHandler, log); log.display("command: " + cmd); - Debugee debugee = binder.startLocalDebugee(cmd); + Debugee debugee = binder.startDebugee(cmd); JDWP.ListenAddress listenAddress = debugee.redirectOutputAndDetectListeningAddress(log); String port = listenAddress.address(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001.java index 142d6387610..7c022bb48fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,7 +116,7 @@ private int run() { //vm.setDebugTraceMode(VirtualMachine.TRACE_ALL); Binder binder = new Binder(argHandler, log); - Debugee debugee = binder.makeLocalDebugee(vm.process()); + Debugee debugee = binder.makeDebugee(vm.process()); debugee.redirectOutput(log); debugee.setupVM(vm); //debugee.waitForVMInit(1000); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001.java index 11aada10a61..539d4e732c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,7 +89,7 @@ private int runIt(String argv[], PrintStream out) { Binder binder = new Binder(argHandler, log); log.display("command: " + cmd); - Debugee debugee = binder.startLocalDebugee(cmd); + Debugee debugee = binder.startDebugee(cmd); debugee.redirectOutput(log); if ((vm = attachTarget()) == null) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002.java index 2f5a966098a..a35b4541071 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/accept/accept002.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -90,7 +90,7 @@ private int runIt(String argv[], PrintStream out) { Binder binder = new Binder(argHandler, log); log.display("command: " + cmd); - Debugee debugee = binder.startLocalDebugee(cmd); + Debugee debugee = binder.startDebugee(cmd); debugee.redirectOutput(log); if ((vm = attachTarget()) == null) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001.java index 2c63d6dc0fa..1bf68896c1d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/listennosuspend/listennosuspend001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,7 +89,7 @@ private int runIt(String argv[], PrintStream out) { Binder binder = new Binder(argHandler, log); log.display("command: " + cmd); - Debugee debugee = binder.startLocalDebugee(cmd); + Debugee debugee = binder.startDebugee(cmd); debugee.redirectOutput(log); if ((vm = attachTarget()) == null) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001.java index 381fdced516..18da5969917 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis001.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -168,7 +168,7 @@ private int runIt(String argv[], PrintStream out) { log.display("command: " + cmd); try { - debugee = binder.startLocalDebugee(cmd); + debugee = binder.startDebugee(cmd); debugee.redirectOutput(log); } catch (Exception e) { stopListen(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002.java index ddae7cb364f..4f43bba75a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ListeningConnector/startListening/startlis002.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -143,7 +143,7 @@ private int runIt(String argv[], PrintStream out) { log.display("command: " + cmd); try { - debugee = binder.startLocalDebugee(cmd); + debugee = binder.startDebugee(cmd); debugee.redirectOutput(log); } catch (Exception e) { stopListen(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002.java index eb43ca30b59..dee135fbfed 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM002.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -150,7 +150,7 @@ private int runThis (String argv[], PrintStream out) { logOnVerbose(infoLogPrefixHead + "PROCESS is being created:"); logOnVerbose(infoLogPrefix + "Command to run: " + commandToRun); - debugee = binder.startLocalDebugee(commandToRun); + debugee = binder.startDebugee(commandToRun); debugee.redirectOutput(logHandler); processToRun = debugee.getProcess(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003.java index 00a35be2102..d1e8f67b293 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM003.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -151,7 +151,7 @@ private int runThis (String argv[], PrintStream out) { logOnVerbose(infoLogPrefixHead + "PROCESS is being created:"); logOnVerbose(infoLogPrefix + "Command to run: " + commandToRun); - debugee = binder.startLocalDebugee(commandToRun); + debugee = binder.startDebugee(commandToRun); debugee.redirectOutput(logHandler); processToRun = debugee.getProcess(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004.java index 07aa33e6ec6..804a92b2b49 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM004.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -154,7 +154,7 @@ private int runThis (String argv[], PrintStream out) { logOnVerbose(infoLogPrefixHead + "PROCESS is being created:"); logOnVerbose(infoLogPrefix + "Command to run: " + commandToRun); - debugee = binder.startLocalDebugee(commandToRun); + debugee = binder.startDebugee(commandToRun); debugee.redirectOutput(logHandler); processToRun = debugee.getProcess(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005.java b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005.java index 1ec79a02d9e..aef6720f917 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachineManager/createVirtualMachine/createVM005.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -150,7 +150,7 @@ private int runThis (String argv[], PrintStream out) { logOnVerbose(infoLogPrefixHead + "PROCESS is being created:"); logOnVerbose(infoLogPrefix + "Command to run: " + commandToRun); - debugee = binder.startLocalDebugee(commandToRun); + debugee = binder.startDebugee(commandToRun); debugee.redirectOutput(logHandler); processToRun = debugee.getProcess(); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Debuggee.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Debuggee.java index f7472e2db03..880771881e5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Debuggee.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Debuggee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,10 +56,10 @@ public class Debuggee extends LocalProcess { } /** - * Launch debuggee on local host. + * Launch debuggee. */ public void launch(String[] args) throws IOException { - launcher.display("Starting local debuggee."); + launcher.display("Starting debuggee."); super.launch(args); redirectStdout(launcher.getLog(), DEBUGEE_STDOUT_LOG_PREFIX ); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java index 44e476d0be7..c25094eddca 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java @@ -31,8 +31,8 @@ import java.util.*; /** - * This class provides launching of jdb and debuggee in local - * or remote mode according to test command line options. + * This class provides launching of jdb and debuggee + * according to test command line options. */ public class Launcher extends DebugeeBinder { @@ -97,24 +97,24 @@ public Launcher (JdbArgumentHandler argumentHandler, Log log) { * Defines mode (local or remote) and type of connector (default, launching, * raw launching, attaching or listening) according to options * parsed by JdbArgumentHandler. And then launches jdb - * and debuggee in defined mode. + * and debuggee. */ public void launchJdbAndDebuggee (String classToExecute) throws IOException { String[] jdbCmdArgs = makeJdbCmdLine(classToExecute); if (argumentHandler.isDefaultConnector()) { - localDefaultLaunch(jdbCmdArgs, classToExecute); + defaultLaunch(jdbCmdArgs, classToExecute); } else if (argumentHandler.isRawLaunchingConnector()) { - localRawLaunch(jdbCmdArgs, classToExecute); + rawLaunch(jdbCmdArgs, classToExecute); } else if (argumentHandler.isLaunchingConnector()) { - localLaunch(jdbCmdArgs, classToExecute); + launchFromJdb(jdbCmdArgs, classToExecute); } else if (argumentHandler.isAttachingConnector()) { - localLaunchAndAttach(jdbCmdArgs, classToExecute); + launchAndAttach(jdbCmdArgs, classToExecute); } else if (argumentHandler.isListeningConnector()) { - localLaunchAndListen(jdbCmdArgs, classToExecute); + launchAndListen(jdbCmdArgs, classToExecute); } else { - throw new TestBug("Unexpected connector type for local launch mode" + throw new TestBug("Unexpected connector type: " + argumentHandler.getConnectorType()); } @@ -255,29 +255,29 @@ private String[] makeJdbCmdLine (String classToExecute) { // ---------------------------------------------- // /** - * Run test in local mode using default connector. + * Run test using default connector. */ - private void localDefaultLaunch + private void defaultLaunch (String[] jdbCmdArgs, String classToExecute) throws IOException { - localLaunch(jdbCmdArgs, classToExecute); + launchFromJdb(jdbCmdArgs, classToExecute); } /** - * Run test in local mode using raw launching connector. + * Run test using raw launching connector. */ - private void localRawLaunch + private void rawLaunch (String[] jdbCmdArgs, String classToExecute) throws IOException { - localLaunch(jdbCmdArgs, classToExecute); + launchFromJdb(jdbCmdArgs, classToExecute); } /** - * Run test in local mode using launching connector. + * Run test using launching connector. */ - private void localLaunch + private void launchFromJdb (String[] jdbCmdArgs, String classToExecute) throws IOException { jdb = new Jdb(this); - display("Starting jdb launching local debuggee"); + display("Starting jdb launching debuggee"); jdb.launch(jdbCmdArgs); if (classToExecute != null) @@ -287,9 +287,9 @@ private String[] makeJdbCmdLine (String classToExecute) { } /** - * Run test in local mode using attaching connector. + * Run test using attaching connector. */ - private void localLaunchAndAttach + private void launchAndAttach (String[] jdbCmdArgs, String classToExecute) throws IOException { debuggee = new Debuggee(this); @@ -297,19 +297,19 @@ private String[] makeJdbCmdLine (String classToExecute) { String[] javaCmdArgs = makeCommandLineArgs(classToExecute, address); debuggee.launch(javaCmdArgs); - display("Start jdb attaching to local debuggee"); + display("Starting jdb attaching to debuggee"); jdb = Jdb.startAttachingJdb (this, jdbCmdArgs, JDB_STARTED); // jdb.waitForPrompt(0, false); } /** - * Run test in local mode using listening connector. + * Run test using listening connector. */ - private void localLaunchAndListen + private void launchAndListen (String[] jdbCmdArgs, String classToExecute) throws IOException { jdb = new Jdb(this); - display("Starting jdb listening to local debuggee"); + display("Starting jdb listening to debuggee"); jdb.launch(jdbCmdArgs); String address = jdb.waitForListeningJdb(); display("Listening address found: " + address); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java index 3f924c6ac47..08bfad05a04 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -474,14 +474,6 @@ protected void checkOptions() { + "jvmdi.strict: non default JVMDI strict mode is not supported now" + getJVMDIStrictMode()); } -/* - if (! isLaunchedLocally() && ! isDefaultJVMDIStrictMode()) { - throw new BadOption("inconsistent options: " - + "-launch.mode=" + getLaunchMode() - + " and -jvmdi.strict=" + getJVMDIStrictMode()); - } - */ - super.checkOptions(); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java index 646d6e9e39e..a30afed77d8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java @@ -123,29 +123,29 @@ public Binder (ArgumentHandler argumentHandler, Log log) { // -------------------------------------------------- // /** - * Make initial Debugee object for local debuggee process + * Make initial Debugee object for debuggee process * started with launching connector. */ - public Debugee makeLocalDebugee(Process process) { + public Debugee makeDebugee(Process process) { return new Debugee(process, this); } /** - * Launch local debuggee process with specified command line + * Launch debuggee process with specified command line * and make initial Debugee object. */ - public Debugee startLocalDebugee(String cmd) { + public Debugee startDebugee(String cmd) { Process process = null; try { process = launchProcess(cmd); } catch (IOException e) { e.printStackTrace(log.getOutStream()); - throw new Failure("Caught exception while launching local debuggee VM process:\n\t" + throw new Failure("Caught exception while launching debuggee VM process:\n\t" + e); } - return makeLocalDebugee(process); + return makeDebugee(process); } /** @@ -154,7 +154,7 @@ public Debugee startLocalDebugee(String cmd) { * VMStartEvent is received and debuggee is initialized. */ public Debugee enwrapDebugee(VirtualMachine vm, Process proc) { - Debugee debugee = makeLocalDebugee(proc); + Debugee debugee = makeDebugee(proc); display("Redirecting VM output"); debugee.redirectOutput(log); @@ -189,17 +189,17 @@ public Debugee bindToDebugeeNoWait(String classToExecute) { prepareForPipeConnection(argumentHandler); if (argumentHandler.isDefaultConnector()) { - debugee = localDefaultLaunchDebugee(vmm, classToExecute, classPath); + debugee = defaultLaunchDebugee(vmm, classToExecute, classPath); } else if (argumentHandler.isRawLaunchingConnector()) { - debugee = localRawLaunchDebugee(vmm, classToExecute, classPath); + debugee = rawLaunchDebugee(vmm, classToExecute, classPath); } else if (argumentHandler.isLaunchingConnector()) { - debugee = localLaunchDebugee(vmm, classToExecute, classPath); + debugee = launchDebugee(vmm, classToExecute, classPath); } else if (argumentHandler.isAttachingConnector()) { - debugee = localLaunchAndAttachDebugee(vmm, classToExecute, classPath); + debugee = launchAndAttachDebugee(vmm, classToExecute, classPath); } else if (argumentHandler.isListeningConnector()) { - debugee = localLaunchAndListenDebugee(vmm, classToExecute, classPath); + debugee = launchAndListenDebugee(vmm, classToExecute, classPath); } else { - throw new TestBug("Unexpected connector type for local debugee launch mode" + throw new TestBug("Unexpected connector type for debugee: " + argumentHandler.getConnectorType()); } @@ -231,9 +231,9 @@ public Debugee bindToDebugee(String classToExecute) { // -------------------------------------------------- // /** - * Launch debugee locally via the default LaunchingConnector. + * Launch debugee via the default LaunchingConnector. */ - private Debugee localDefaultLaunchDebugee (VirtualMachineManager vmm, + private Debugee defaultLaunchDebugee (VirtualMachineManager vmm, String classToExecute, String classPath) { display("Finding connector: " + "default" ); @@ -257,7 +257,7 @@ private Debugee localDefaultLaunchDebugee (VirtualMachineManager vmm, }; Process process = vm.process(); - Debugee debugee = makeLocalDebugee(process); + Debugee debugee = makeDebugee(process); debugee.redirectOutput(log); debugee.setupVM(vm); @@ -266,9 +266,9 @@ private Debugee localDefaultLaunchDebugee (VirtualMachineManager vmm, /** - * Launch debugee locally via the default LaunchingConnector. + * Launch debugee via the default LaunchingConnector. */ - private Debugee localLaunchDebugee (VirtualMachineManager vmm, + private Debugee launchDebugee (VirtualMachineManager vmm, String classToExecute, String classPath) { @@ -295,7 +295,7 @@ private Debugee localLaunchDebugee (VirtualMachineManager vmm, }; Process process = vm.process(); - Debugee debugee = makeLocalDebugee(process); + Debugee debugee = makeDebugee(process); debugee.redirectOutput(log); debugee.setupVM(vm); @@ -303,9 +303,9 @@ private Debugee localLaunchDebugee (VirtualMachineManager vmm, } /** - * Launch debugee locally via the RawLaunchingConnector. + * Launch debugee via the RawLaunchingConnector. */ - private Debugee localRawLaunchDebugee (VirtualMachineManager vmm, + private Debugee rawLaunchDebugee (VirtualMachineManager vmm, String classToExecute, String classPath) { display("Finding connector: " + argumentHandler.getConnectorName() ); @@ -331,7 +331,7 @@ private Debugee localRawLaunchDebugee (VirtualMachineManager vmm, }; Process process = vm.process(); - Debugee debugee = makeLocalDebugee(process); + Debugee debugee = makeDebugee(process); debugee.redirectOutput(log); debugee.setupVM(vm); @@ -339,10 +339,9 @@ private Debugee localRawLaunchDebugee (VirtualMachineManager vmm, } /** - * Launch debugee VM locally as a local process and connect to it using - * AttachingConnector. + * Launch debugee VM and connect to it using AttachingConnector. */ - private Debugee localLaunchAndAttachDebugee (VirtualMachineManager vmm, + private Debugee launchAndAttachDebugee (VirtualMachineManager vmm, String classToExecute, String classPath) { display("FindingConnector: " + argumentHandler.getConnectorName() ); @@ -356,7 +355,7 @@ private Debugee localLaunchAndAttachDebugee (VirtualMachineManager vmm, String javaCmdLine = makeCommandLineString(classToExecute, address, "\""); display("Starting java process:\n\t" + javaCmdLine); - Debugee debugee = startLocalDebugee(cmdLineArgs); + Debugee debugee = startDebugee(cmdLineArgs); debugee.redirectOutput(log); display("Attaching to debugee"); @@ -391,10 +390,9 @@ private Debugee localLaunchAndAttachDebugee (VirtualMachineManager vmm, } /** - * Launch debugee VM locally as a local process and connect to it using - * ListeningConnector. + * Launch debugee VM and connect to it using ListeningConnector. */ - private Debugee localLaunchAndListenDebugee (VirtualMachineManager vmm, + private Debugee launchAndListenDebugee (VirtualMachineManager vmm, String classToExecute, String classPath) { display("Finding connector: " + argumentHandler.getConnectorName() ); @@ -419,7 +417,7 @@ private Debugee localLaunchAndListenDebugee (VirtualMachineManager vmm, String javaCmdLine = makeCommandLineString(classToExecute, address, "\""); display("Starting java process:\n\t" + javaCmdLine); - Debugee debugee = startLocalDebugee(cmdLineArgs); + Debugee debugee = startDebugee(cmdLineArgs); debugee.redirectOutput(log); display("Waiting for connection from debugee"); @@ -685,21 +683,21 @@ private Connector findConnector(String connectorName, List connectors) { // -------------------------------------------------- // /** - * Launch local debuggee process with specified command line arguments + * Launch debuggee process with specified command line arguments * and make initial Debugee mirror. */ - protected Debugee startLocalDebugee(String[] cmdArgs) { + protected Debugee startDebugee(String[] cmdArgs) { Process process = null; try { process = launchProcess(cmdArgs); } catch (IOException e) { e.printStackTrace(log.getOutStream()); - throw new Failure("Caught exception while launching local debuggee VM process:\n\t" + throw new Failure("Caught exception while launching debuggee VM process:\n\t" + e); } - return makeLocalDebugee(process); + return makeDebugee(process); } public static String readVMStartExceptionOutput(VMStartException e, PrintStream log) { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java b/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java index b875911e973..def9e9c6013 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java @@ -52,7 +52,7 @@ * @see nsk.share.jdi.Debugee * @see nsk.share.jdwp.Debugee */ -abstract public class DebugeeProcess { +public class DebugeeProcess { /** Default prefix for log messages. */ public static final String LOG_PREFIX = "binder> ";