[Esbox-commits] r882 - in trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb: META-INF src/org/maemo/esbox/cpp/launch/dsf/gdb/service

lwang at garage.maemo.org lwang at garage.maemo.org
Tue Oct 21 02:10:20 EEST 2008


Author: lwang
Date: 2008-10-21 02:10:19 +0300 (Tue, 21 Oct 2008)
New Revision: 882

Modified:
   trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/META-INF/MANIFEST.MF
   trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGDBBackendService.java
   trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGdbDebugServiceFactory.java
Log:
Changes to match upstream change.

Modified: trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/META-INF/MANIFEST.MF
===================================================================
--- trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/META-INF/MANIFEST.MF	2008-10-17 13:42:38 UTC (rev 881)
+++ trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/META-INF/MANIFEST.MF	2008-10-20 23:10:19 UTC (rev 882)
@@ -15,6 +15,7 @@
  org.eclipse.dd.dsf.debug;bundle-version="1.1.0",
  org.eclipse.dd.gdb;bundle-version="1.1.0",
  org.eclipse.dd.gdb.ui;bundle-version="1.1.0",
+ org.eclipse.dd.mi;bundle-version="1.1.0",
  org.eclipse.cdt.debug.core;bundle-version="5.0.0",
  org.eclipse.cdt.core;bundle-version="5.0.1"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5

Modified: trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGDBBackendService.java
===================================================================
--- trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGDBBackendService.java	2008-10-17 13:42:38 UTC (rev 881)
+++ trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGDBBackendService.java	2008-10-20 23:10:19 UTC (rev 882)
@@ -17,9 +17,10 @@
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.dd.dsf.service.DsfSession;
-import org.eclipse.dd.gdb.internal.provisional.service.GDBBackendService;
+import org.eclipse.dd.gdb.internal.provisional.service.GDBBackend;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.maemo.esbox.core.ESboxException;
+import org.maemo.esbox.core.process.CommandLineArguments;
 import org.maemo.esbox.core.process.IProcessLauncher;
 import org.maemo.esbox.core.process.IProcessLauncherFactory;
 import org.maemo.esbox.core.process.ProcessLauncherCreator;
@@ -32,12 +33,10 @@
  * Scratchbox relative.
  * 
  */
-public class ESboxGDBBackendService extends GDBBackendService {
+public class ESboxGDBBackendService extends GDBBackend {
 
 	private ISDKTarget 		fSDKTarget = null;
 
-	private List<String>	fSboxGdbCommandLine;
-	
 	private IPath			fSboxProgramPath;
 	
 	private IPath 			fSboxGDBWorkingDirectory;
@@ -53,25 +52,6 @@
 	}
 
 	@Override
-	public List<String> getGDBCommandLine() {
-		if (fSboxGdbCommandLine == null) {
-			List<String> cmdLine = super.getGDBCommandLine();
-
-			// covert the command line so that gdb will be launched in Scratchbox.
-			//
-			if (fSDKTarget != null) {
-				IProcessLauncherFactory factory = fSDKTarget.getProcessLauncherFactory();
-				IProcessLauncher launcher = ProcessLauncherCreator.createProcessLauncher(factory, null, cmdLine);
-				cmdLine = launcher.getLaunchCommandArguments();
-			}
-			
-			fSboxGdbCommandLine = cmdLine;
-		}
-		
-		return fSboxGdbCommandLine;
-	}
-
-	@Override
 	public String getGDBInitFile() throws CoreException {
 		// init file, if any, needs be accessible from scratchbox. 
 		if (fSboxGDBInitFile == null) {
@@ -143,8 +123,7 @@
 	}
 
 	@Override
-	protected Process launchGDBProcess() throws CoreException {
-		List<String> cmdLine = super.getGDBCommandLine();
+	protected Process launchGDBProcess(String cmdLine) throws CoreException {
 
 		String message = null;
 		
@@ -156,7 +135,8 @@
 			try {
 				return launcher.createProcess();
 			} catch (ESboxException e) {
-	            message = "Error launching GDB in scratchbox";
+	            message = "Error launching GDB in scratchbox: " + 
+	            	CommandLineArguments.toCommandLine(launcher.getLaunchCommandArguments());
 	            throw new CoreException(Activator.createErrorStatus(message, e));
 			}
 		}

Modified: trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGdbDebugServiceFactory.java
===================================================================
--- trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGdbDebugServiceFactory.java	2008-10-17 13:42:38 UTC (rev 881)
+++ trunk/cpp/org.maemo.esbox.cpp.launch.dsf.gdb/src/org/maemo/esbox/cpp/launch/dsf/gdb/service/ESboxGdbDebugServiceFactory.java	2008-10-20 23:10:19 UTC (rev 882)
@@ -13,7 +13,7 @@
 
 import org.eclipse.dd.dsf.service.DsfSession;
 import org.eclipse.dd.gdb.internal.provisional.service.GdbDebugServicesFactory;
-import org.eclipse.dd.gdb.internal.provisional.service.IGDBBackendService;
+import org.eclipse.dd.gdb.internal.provisional.service.IGDBBackend;
 import org.eclipse.debug.core.ILaunchConfiguration;
 
 /**
@@ -30,7 +30,7 @@
 	}
 
 	@Override
-	protected IGDBBackendService createBackendGDBService(DsfSession session,
+	protected IGDBBackend createBackendGDBService(DsfSession session,
 			ILaunchConfiguration lc) {
 		return new ESboxGDBBackendService(session, lc);
 	}



More information about the Esbox-commits mailing list