PATCH: PowerPC simulator doesn't handle spaces in filenames

Daniel Jacobowitz drow@false.org
Tue Jan 24 21:24:00 GMT 2006


On Mon, Jan 23, 2006 at 09:59:43PM -0800, Mark Mitchell wrote:
> 
> The PowerPC simulator simulates bits of openprom functionality.  In
> particular, it feeds the program file name into the openprom device
> tree.  However, filenames containing a space or backslash (both of
> which are very common on Windows, but can also occur on UNIX), were
> not quoted.  (Here, quoting means enclosing the entire filename in
> double-quotes, and protecting backslashes by double-quoting them.)
> 
> Tested by verifying that I could run a PowerPC program with a space
> and/or backslash in its name, on both x86_64-unknown-linux-gnu and
> i686-mingw32. 
> 
> OK?

You've escaped backslashes, but what about double quotes?  I assume
this eventually goes to parse_string_property.  It's not immediately
obvious, but the unescaping loop there will unescape both backslashes
and double quotes (see print_string).

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list