Skip to content

Commit 75204a0

Browse files
committed
jlink accept path with spaces
- Backend0 moved here, to have access to gdb client code - all exec() calls changed to use string arrays - swo output only when swd enabled
1 parent 9dcc837 commit 75204a0

File tree

7 files changed

+1207
-83
lines changed

7 files changed

+1207
-83
lines changed

ilg.gnuarmeclipse.debug.gdbjtag.jlink/src/ilg/gnuarmeclipse/debug/gdbjtag/jlink/Backend.java

+9-10
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
import java.util.concurrent.ExecutionException;
77
import java.util.concurrent.TimeUnit;
88

9-
import org.eclipse.cdt.debug.gdbjtag.core.IGDBJtagConstants;
109
import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
1110
import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
1211
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
1312
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
1413
import org.eclipse.cdt.dsf.concurrent.Sequence;
15-
import org.eclipse.cdt.dsf.gdb.service.GDBBackend;
1614
import org.eclipse.cdt.dsf.gdb.service.command.GDBControl.InitializationShutdownStep;
1715
import org.eclipse.cdt.dsf.service.DsfSession;
1816
import org.eclipse.cdt.utils.spawner.ProcessFactory;
@@ -25,7 +23,7 @@
2523
import org.eclipse.debug.core.DebugException;
2624
import org.eclipse.debug.core.ILaunchConfiguration;
2725

28-
public class Backend extends GDBBackend {
26+
public class Backend extends Backend0 {
2927

3028
private final ILaunchConfiguration fLaunchConfiguration;
3129

@@ -75,12 +73,12 @@ public Process getSemihostingProcess() {
7573
return fSemihostingProcess;
7674
}
7775

78-
protected IPath getGDBPath() {
79-
return Utils.getGDBPath(fLaunchConfiguration);
80-
}
76+
// protected IPath getGDBPath() {
77+
// return Utils.getGDBPath(fLaunchConfiguration);
78+
// }
8179

8280
// do not rename!
83-
protected Process launchGDBProcess(String commandLine) throws CoreException {
81+
/* protected Process launchGDBProcess(String commandLine) throws CoreException {
8482
Process proc = null;
8583
try {
8684
proc = ProcessFactory.getFactory().exec(commandLine,
@@ -93,6 +91,7 @@ protected Process launchGDBProcess(String commandLine) throws CoreException {
9391
9492
return proc;
9593
}
94+
*/
9695

9796
protected Process launchSemihostingProcess(String host, int port)
9897
throws CoreException {
@@ -289,11 +288,11 @@ protected IStatus run(IProgressMonitor monitor) {
289288
return Status.OK_STATUS;
290289
}
291290

292-
String commandLine = TabDebugger
293-
.getGdbServerCommandLine(fLaunchConfiguration);
291+
String[] commandLineArray = TabDebugger
292+
.getGdbServerCommandLineArray(fLaunchConfiguration);
294293

295294
try {
296-
fServerProcess = launchGDBProcess(commandLine);
295+
fServerProcess = launchGDBProcess(commandLineArray);
297296
// Need to do this on the executor for thread-safety
298297
getExecutor().submit(new DsfRunnable() {
299298
@Override

0 commit comments

Comments
 (0)