1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-16 12:45:41 +02:00

[257190] - fixed spaces in file names

This commit is contained in:
Alena Laskavaia 2008-12-03 18:50:24 +00:00
parent 3ef82b3a78
commit 513bac33e5

View file

@ -14,7 +14,6 @@ package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import java.util.Collection;
/**
* @author ajin
*
@ -44,7 +43,6 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
return 0;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doRemote(java.lang.String, int, java.util.Collection)
*/
@ -73,19 +71,25 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doLoadImage(java.lang.String, java.lang.String, java.util.Collection)
*/
public void doLoadImage(String imageFileName, String imageOffset, Collection commands) {
String cmd = "restore " + imageFileName + " " + imageOffset;
String file = escapeScpaces(imageFileName);
String cmd = "restore " + file + " " + imageOffset;
addCmd(commands, cmd);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doLoadSymbol(java.lang.String, java.lang.String, java.util.Collection)
*/
public void doLoadSymbol(String symbolFileName, String symbolOffset, Collection commands) {
String cmd = "add-sym " + symbolFileName + " " + symbolOffset;
String file = escapeScpaces(symbolFileName);
String cmd = "add-sym " + file + " " + symbolOffset;
addCmd(commands, cmd);
}
protected String escapeScpaces(String file) {
if (file.indexOf(' ') >= 0) { return '"' + file + '"'; }
return file;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.IGDBJtagDevice#doSetPC(java.lang.String, java.util.Collection)
*/