Remove unused BindServer and update comments related to remote and manually started debugees

This commit is contained in:
Chris Plummer 2025-06-12 10:52:03 -07:00
parent 429158218b
commit 21dc4e5df0
6 changed files with 11 additions and 1904 deletions

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -32,7 +32,7 @@ import java.util.*;
/** /**
* This class provides launching of <code>jdb</code> and debuggee in local * This class provides launching of <code>jdb</code> and debuggee in local
* or remote mode according to test command line options. * mode according to test command line options.
*/ */
public class Launcher extends DebugeeBinder { public class Launcher extends DebugeeBinder {
@ -94,7 +94,7 @@ public class Launcher extends DebugeeBinder {
} }
/** /**
* Defines mode (local or remote) and type of connector (default, launching, * Defines mode (local) and type of connector (default, launching,
* raw launching, attaching or listening) according to options * raw launching, attaching or listening) according to options
* parsed by <code>JdbArgumentHandler</code>. And then launches <code>jdb</code> * parsed by <code>JdbArgumentHandler</code>. And then launches <code>jdb</code>
* and debuggee in defined mode. * and debuggee in defined mode.

File diff suppressed because it is too large Load Diff

View File

@ -67,8 +67,6 @@ import java.net.ServerSocket;
* using JVMDI strict mode * using JVMDI strict mode
* <li> <code>-pipe.port=</code>&lt;<i>port</i>&gt; - * <li> <code>-pipe.port=</code>&lt;<i>port</i>&gt; -
* port number for internal IOPipe connection * port number for internal IOPipe connection
* <li> <code>-bind.port=</code>&lt;<i>port</i>&gt; -
* port number for BindServer connection
* </ul> * </ul>
* <p> * <p>
* See also list of basic options recognized by * See also list of basic options recognized by
@ -421,47 +419,6 @@ public class DebugeeArgumentHandler extends ArgumentParser {
return (java_home == null); return (java_home == null);
} }
private boolean bindPortInited = false;
/**
* Return string representation of the port number for BindServer connection,
* specified by <code>-bind.port</code> command line option, or
* "<i>DEFAULT_BIND_PORT</i>" string by default.
*
* @see #getBindPortNumber()
* @see #setRawArguments(String[])
*/
public String getBindPort() {
String port = options.getProperty("bind.port");
if (port == null) {
if (!bindPortInited) {
port = findFreePort();
if (port == null) {
port = DEFAULT_BIND_PORT;
}
options.setProperty("bind.port", port);
bindPortInited = true;
}
}
return port;
}
/**
* Return port number for BindServer connection,
* specified by <code>-bind.port</code> command line option, or
* "<i>DEFAULT_BIND_PORT</i>" port number by default.
*
* @see #getBindPort()
* @see #setRawArguments(String[])
*/
public int getBindPortNumber() {
String value = getBindPort();
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
throw new TestBug("Not integer value of \"bind.port\" argument: " + value);
}
}
/** /**
* Return JVMDI strict mode for launching debugee VM, specified by. * Return JVMDI strict mode for launching debugee VM, specified by.
* <code>-jvmdi.strict</code> command line option, or * <code>-jvmdi.strict</code> command line option, or
@ -683,7 +640,6 @@ public class DebugeeArgumentHandler extends ArgumentParser {
// option with positive integer port value // option with positive integer port value
if (option.equals("transport.port") if (option.equals("transport.port")
|| option.equals("bind.port")
|| option.equals("pipe.port")) { || option.equals("pipe.port")) {
try { try {
int number = Integer.parseInt(value); int number = Integer.parseInt(value);

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -52,8 +52,8 @@ import java.util.*;
* @see DebugeeArgumentHandler * @see DebugeeArgumentHandler
* @see DebugeeProcess * @see DebugeeProcess
* @see IOPipe * @see IOPipe
* @see BindServer
* *
* @see nsk.share.jdb.Launcher
* @see nsk.share.jdi.Binder * @see nsk.share.jdi.Binder
* @see nsk.share.jdwp.Binder * @see nsk.share.jdwp.Binder
*/ */

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,7 @@ import java.util.function.Consumer;
* This is an abstract class that declares abstract methods to control * This is an abstract class that declares abstract methods to control
* debugee VM process. * debugee VM process.
* Derived classes should implement these methods corresponding to the mode * Derived classes should implement these methods corresponding to the mode
* that the process should be started in (locally, remotely or manually). * that the process should be started in (locally).
* <p> * <p>
* Particular derived classes <code>nsk.share.jdi.Debugee</code> and * Particular derived classes <code>nsk.share.jdi.Debugee</code> and
* <code>nsk.share.jdwp.Debugee</code> provides additional abilities * <code>nsk.share.jdwp.Debugee</code> provides additional abilities

View File

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,12 +29,10 @@ import nsk.share.jdi.Binder;
/** /**
* This class implements communicational channel between * This class implements communicational channel between
* debugger and debugee used for synchronization and data exchange. * debugger and debugee used for synchronization and data exchange.
* This channel is based on TCP/IP sockets and works in all * This channel is based on TCP/IP socketss.
* modes (local, remote and manual). In a remote mode
* connection to <code>BindServer</code> is used for redirecting IOPipe messages.
* In all other modes direct TCP/IP coonnection between two VMs is used.
* *
* @see BindServer * @see jpda.DebugeeArgumentHandler
* @see jpda.DebugeeProcess
*/ */
public class IOPipe extends SocketIOPipe { public class IOPipe extends SocketIOPipe {