Hi John,
You can set the command factory you want to use in the launch
configuration dialog.
Regards,
Mikhail
-----Original Message-----
From: cdt-debug-dev-bounces@xxxxxxxxxxx
[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of John MOULE
Sent: 03 April 2007 12:57
To: cdt-debug-dev@xxxxxxxxxxx
Subject: [cdt-debug-dev] "Unable to set working directory"
Hi,
I have a launch configuration delegate, shown in the code snippet at the
bottom, which adds quotes around the path issued to the GDB command
"environment-cd" to get around spaces in path/filenames.
I have two launch configurations, A and B, created from Standard Make
Projects; A works and B gives the following error:
<[Launching] error dialog>
Failed to set program arguments, environment or working directory.
Unable to set working directory: \"D:\\STFAE\": Invalid argument.
</[Launching] error dialog>
The GDB comms log shows the following:
[1,175,600,190,664] (gdb)
[1,175,600,201,711] 152-environment-cd \"D:\\\\STFAE\"
[1,175,600,201,726] &"\\\"D:\\\\\\\\STFAE\\\": Invalid argument.\n"
[1,175,600,201,726] 152^error,msg="\\\"D:\\\\\\\\STFAE\\\": Invalid
argument."
[1,175,600,201,726] (gdb)
[1,175,600,201,726] 153 kill
[1,175,600,201,726] 154-gdb-exit
I noticed that the dodgy B launch config contains the following line,
which the working one, A, doesn't (from
\<workspace>\.metadata\.plugins\org.eclipse.debug.core\.launches):
<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory"
value="org.eclipse.cdt.debug.mi.core.cygwinCommandFactory"/>
If I remove this the launch configuration do not give the error.
Can anyone tell me under what circumstances the cygwinCommandFactory is
used in preference to the default commandfactory please?
Many thanks, john
WinXPSP2
Eclipse 3.2.0
CDT 3.1.0
GDB 6.5 (ST customised)
<code>
String quotedPath = "\"" + wd.getAbsolutePath() + "\"";
String dblSlashQuotedPath = quotedPath;
if(Platform.getOS().equalsIgnoreCase(Platform.OS_WIN32))
{ /* windows */
dblSlashQuotedPath = quotedPath.replaceAll("\\\\", "\\\\\\\\");
}
opt.setWorkingDirectory(dblSlashQuotedPath);
</code>