Spaces in file names

Andrew STUBBS andrew.stubbs@st.com
Tue Dec 6 16:16:00 GMT 2005


Hi all,

I have recently posted some patches to allow quoting and therefore 
spaces in commands that did not support them.

exec-file and symbol-file already supported them, as do all the break 
commands and variants.

directory (including --directory), add-symbol-file and others do not 
support spaces or quoting. It seems quite clear to me that the best 
thing to do here is to change them to use buildargv(). Users will have 
to quote names with quotes in, but they will be able to use spaces 
(properly quoted).

Less clear is what to do with source, core-file and perhaps some other 
commands which happen to support spaces in files because they do zero 
processing on their input. These commands will not do the right thing 
with quotes. I could fix this inconsistency by using buildargv() as 
everywhere else, but the user would then have to quote spaces which will 
make it backward incompatible.

Any insights?

Andrew Stubbs



More information about the Gdb mailing list