diff options
author | Joel Brobecker <brobecker@gnat.com> | 2012-10-24 13:40:16 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2012-10-24 13:40:16 +0000 |
commit | 8f205f9c4014c41b96b25b8b56f62185996ef7bf (patch) | |
tree | 5c2db112ff50d14dc0e4876bcf0e232fd3d1812d /install-sh | |
parent | 96a62921794e1363ea0fefe723c665c23b341dbc (diff) | |
download | gdb-8f205f9c4014c41b96b25b8b56f62185996ef7bf.zip gdb-8f205f9c4014c41b96b25b8b56f62185996ef7bf.tar.gz gdb-8f205f9c4014c41b96b25b8b56f62185996ef7bf.tar.bz2 |
[Windows] run program with space in path to exe.
The following works...
% gdb c:\path to exe\foo.exe
(gdb) start
... unless a file or directory called "c:\path" or "c:\path to" exist.
This is what happens in the latter case:
(gdb) start
[...]
Error creating process C:\path to exe\foo.exe (error 193).
This is because we are calling CreateProcess (et al) without specifying
the lpApplicationName, so Windows determines the name of the executable
using the second argument, which is the entire command line. This
command line is a space-separated list of tokens, so the space in
the path to the executable which potentially creates an ambiguity.
The ambiguity is automatically resolved unless we're in the situation
above.
The solution, as suggested by the MSDN documentation for CreateProcess
is to quote the executable name.
gdb/ChangeLog:
* windows-nat.c (windows_create_inferior) [!__CYGWIN__]:
New local variable args_len.
Quote the name of the executable when computing the command line.
Diffstat (limited to 'install-sh')
0 files changed, 0 insertions, 0 deletions