[Lldb-commits] [lldb] r189313 - OptionValueFileSpec::SetValueFromCString() is passed a complete file pathname -- it

Jason Molenda jmolenda at apple.com
Mon Aug 26 21:58:31 PDT 2013


Author: jmolenda
Date: Mon Aug 26 23:58:31 2013
New Revision: 189313

URL: http://llvm.org/viewvc/llvm-project?rev=189313&view=rev
Log:
OptionValueFileSpec::SetValueFromCString() is passed a complete file pathname -- it 
should not split up that pathname itself or require quoting to avoid the same.

This fixing a bug where target create -c "core file" or target create -s "symbol file"
will fail with an error message that the paths haven't been properly quoted.  Working
around it required target create -c "core\ file" to survive both attemps at tokenizing.

<rdar://problem/14230629> 


Modified:
    lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp

Modified: lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp?rev=189313&r1=189312&r2=189313&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp Mon Aug 26 23:58:31 2013
@@ -84,17 +84,8 @@ OptionValueFileSpec::SetValueFromCString
     case eVarSetOperationAssign:
         if (value_cstr && value_cstr[0])
         {
-            Args args(value_cstr);
-            if (args.GetArgumentCount() == 1)
-            {
-                const char *path = args.GetArgumentAtIndex(0);
-                m_value_was_set = true;
-                m_current_value.SetFile(path, true);
-            }
-            else
-            {
-                error.SetErrorString("please supply a single path argument for this file or quote the path if it contains spaces");
-            }
+            m_value_was_set = true;
+            m_current_value.SetFile(value_cstr, true);
         }
         else
         {





More information about the lldb-commits mailing list