This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Allow spaces in filename to add-symbol-file command


On Tue, Dec 06, 2005 at 05:03:24PM +0000, Andrew STUBBS wrote:
> Hi,
> 
> The war against missing space support continues!
> 
> I have altered add_symbol_file_command() to use buildargv() instead of 
> parsing the arguments itself. This should allow quoting and hence spaces 
> in the filename.
> 
> Additionally, I have reordered the help message so that 'help files' 
> uses the right part of the message and updated the testsuite to match.
> 
> OK?

> 2005-12-06  Andrew Stubbs  <andrew.stubbs@st.com>
> 
> 	* symfile.c (add_symbol_file_command): Use buildargv(), instead of
> 	hand decoding the command line, to allow use of quotes and spaces.
> 	(_initialize_symfile): Reorganize the help message for add-symbol-file
> 	such that 'help files' shows a better message.
> 
> testsuite/
> 	* gdb.base/help.exp (help add-symbol-file): Update.

Yes, this is OK.  Thanks.

It is an incompatible change in one small corner-case - backslashes
will suddenly be escaped for files without spaces, while previously
they were not.  But, the most prevalent file-related command is
"file" (and "exec-file" and "symbol-file"), so I think following them
is a good choice.

Interestingly, var_filename calls tilde_expand, includes all remaining
text on the line ignoring whitespace, and doesn't handle quotes or
backslashes.  Ditto for var_optional_filename (which is used for
"set args" - what the heck?).

Do we need to clean this up? :-(

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]