예제 #1
0
파일: VMConnection.java 프로젝트: 9r3y/c47
 /* attach to running target vm */
 private VirtualMachine attachTarget() {
   AttachingConnector attacher = (AttachingConnector) connector;
   try {
     return attacher.attach(connectorArgs);
   } catch (IOException ioe) {
     ioe.printStackTrace();
     MessageOutput.fatalError("Unable to attach to target VM.");
   } catch (IllegalConnectorArgumentsException icae) {
     icae.printStackTrace();
     MessageOutput.fatalError("Internal debugger error.");
   }
   return null; // Shuts up the compiler
 }
예제 #2
0
파일: VMConnection.java 프로젝트: 9r3y/c47
 /* listen for connection from target vm */
 private VirtualMachine listenTarget() {
   ListeningConnector listener = (ListeningConnector) connector;
   try {
     String retAddress = listener.startListening(connectorArgs);
     MessageOutput.println("Listening at address:", retAddress);
     vm = listener.accept(connectorArgs);
     listener.stopListening(connectorArgs);
     return vm;
   } catch (IOException ioe) {
     ioe.printStackTrace();
     MessageOutput.fatalError("Unable to attach to target VM.");
   } catch (IllegalConnectorArgumentsException icae) {
     icae.printStackTrace();
     MessageOutput.fatalError("Internal debugger error.");
   }
   return null; // Shuts up the compiler
 }
예제 #3
0
파일: VMConnection.java 프로젝트: 9r3y/c47
 /* launch child target vm */
 private VirtualMachine launchTarget() {
   LaunchingConnector launcher = (LaunchingConnector) connector;
   try {
     VirtualMachine vm = launcher.launch(connectorArgs);
     process = vm.process();
     displayRemoteOutput(process.getErrorStream());
     displayRemoteOutput(process.getInputStream());
     return vm;
   } catch (IOException ioe) {
     ioe.printStackTrace();
     MessageOutput.fatalError("Unable to launch target VM.");
   } catch (IllegalConnectorArgumentsException icae) {
     icae.printStackTrace();
     MessageOutput.fatalError("Internal debugger error.");
   } catch (VMStartException vmse) {
     MessageOutput.println("vmstartexception", vmse.getMessage());
     MessageOutput.println();
     dumpFailedLaunchInfo(vmse.process());
     MessageOutput.fatalError("Target VM failed to initialize.");
   }
   return null; // Shuts up the compiler
 }