2 * Copyright (c) 2000, 2001, 2003 Paul Kinnucan
7 package jde.debugger.command;
9 import jde.debugger.Debugger;
10 import jde.debugger.JDEException;
11 import jde.debugger.SessionManager;
15 * Attaches to an already running application through a socket.
20 * attach_socket app_id -port p_value [-host h_value]
25 * <li> The debugee vm has to have been launched with the right parameters.
26 * See the <italic>Connection and Invocation</italic> section of the
30 * @author Paul Kinnucan
31 * @version $Revision: 1.5 $
33 public class AttachSocket extends DebugSessionCommand {
37 * @exception jde.debugger.JDEException <description>
39 protected void doCommand() throws JDEException {
40 // XXX - fix the 'true' here, and define a better way to determine
41 // whether to use a GUI or not.
42 Debugger debugger = new Debugger(m_targetProcessID, true);
44 SessionManager.registerDebugger(debugger);
47 debugger.attachVMSocket(m_args);
50 catch (JDEException e) {
51 SessionManager.deregisterDebugger(debugger);
55 debugger.signalCommandResult(m_cmdID, null, CMD_OK);
58 public Object clone() {return new AttachSocket();}
65 * $Log: AttachSocket.java,v $
66 * Revision 1.5 2003/01/15 05:56:26 paulk
67 * Add Petter Mahlen's changes.
69 * Revision 1.4 2001/03/24 05:42:36 paulk
70 * Updated to reflect reorganization of debugger code.
72 * Revision 1.3 2000/08/09 03:43:07 paulk
73 * Fixed bug where JDEBug would not attach to a process running on a remote host because it was setting the wrong connector argument (host instead of hostname). Thanks to Matthew Conway <matt_conway@i2.com>.
75 * Revision 1.2 2000/02/02 05:58:12 paulk
76 * Added command succeeded messages.
78 * Revision 1.1 2000/01/31 12:45:08 paulk
79 * Attach existing application through socket.
83 // End of AttachSocket.java