This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Allow spaces in filename to add-symbol-file command
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Mon, 20 Feb 2006 12:14:59 -0500
- Subject: Re: [PATCH] Allow spaces in filename to add-symbol-file command
- References: <4395C45C.2090108@st.com>
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