views:

1190

answers:

1

Hey!

I'm receiving a rather cryptic error when attempting to debug a simple C++ application.

Message: "Error creating session"

Stacktrace:

org.eclipse.cdt.debug.mi.core.MIException: Process Terminated
    at org.eclipse.cdt.debug.mi.core.MISession.setup(MISession.java:232)
    at org.eclipse.cdt.debug.mi.core.MISession.<init>(MISession.java:204)
    at org.eclipse.cdt.debug.mi.core.MIPlugin.createMISession0(MIPlugin.java:135)
    at org.eclipse.cdt.debug.mi.core.MIPlugin.createSession(MIPlugin.java:464)
    at org.eclipse.cdt.debug.mi.core.AbstractGDBCDIDebugger.createGDBSession(AbstractGDBCDIDebugger.java:114)
    at org.eclipse.cdt.debug.mi.core.AbstractGDBCDIDebugger.createSession(AbstractGDBCDIDebugger.java:68)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launchDebugSession(LocalCDILaunchDelegate.java:343)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.createCDISession(LocalCDILaunchDelegate.java:468)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launchLocalDebugSession(LocalCDILaunchDelegate.java:145)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launchDebugger(LocalCDILaunchDelegate.java:112)
    at org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate.launch(LocalCDILaunchDelegate.java:72)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

OS: Ubuntu 32 9.04

gdb: GNU gdb 6.8-debian

eclipse: 20090619-0625

gdb is in my path and is executable from the terminal.

I've also tried using both the 'elf' and 'GNU' binary parsers to no avail.

Any ideas anyone?

ashley

+2  A: 

Not much ideas, except looking at the source code of MSISession:

     // The Process may have terminated earlier because
     // of bad arguments etc .. check this here and bail out.
     try {
      process.exitValue();
      InputStream err = process.getErrorStream();
      BufferedReader reader = new BufferedReader(new InputStreamReader(err));
      String line = null;
      try {
       line = reader.readLine();
       reader.close();
      } catch (Exception e) {
       // the reader may throw a NPE.
      }
      if (line == null) {
       line = MIPlugin.getResourceString("src.MISession.Process_Terminated"); //$NON-NLS-1$
      }
      throw new MIException(line);
     }

Meaning that somehow, when you are at this stage, the Process has already produced some errors, probably due to bad arguments.

VonC
Thank you for digging up the source!I just tried again to debug (after a restart) - no problems!Dear oh dear.
Ash Kim