[Lldb-commits] [lldb] r253599 - Fix an issue where LLDB would not launch argdumper correctly if there were spaces in the path to it

Enrico Granata via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 19 13:17:56 PST 2015


Author: enrico
Date: Thu Nov 19 15:17:56 2015
New Revision: 253599

URL: http://llvm.org/viewvc/llvm-project?rev=253599&view=rev
Log:
Fix an issue where LLDB would not launch argdumper correctly if there were spaces in the path to it

Modified:
    lldb/trunk/source/Host/macosx/Host.mm
    lldb/trunk/source/Host/windows/Host.cpp

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=253599&r1=253598&r2=253599&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Thu Nov 19 15:17:56 2015
@@ -1366,8 +1366,11 @@ Host::ShellExpandArguments (ProcessLaunc
             error.SetErrorStringWithFormat("could not find the lldb-argdumper tool: %s", expand_tool_spec.GetPath().c_str());
             return error;
         }
+        
+        StreamString expand_tool_spec_stream;
+        expand_tool_spec_stream.Printf("\"%s\"",expand_tool_spec.GetPath().c_str());
 
-        Args expand_command(expand_tool_spec.GetPath().c_str());
+        Args expand_command(expand_tool_spec_stream.GetData());
         expand_command.AppendArguments (launch_info.GetArguments());
         
         int status;

Modified: lldb/trunk/source/Host/windows/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Host.cpp?rev=253599&r1=253598&r2=253599&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/Host.cpp (original)
+++ lldb/trunk/source/Host/windows/Host.cpp Thu Nov 19 15:17:56 2015
@@ -245,7 +245,7 @@ Host::ShellExpandArguments (ProcessLaunc
         std::replace(quoted_cmd_string.begin(), quoted_cmd_string.end(), '\\', '/');
         StreamString expand_command;
         
-        expand_command.Printf("%s %s",
+        expand_command.Printf("\"%s\" %s",
                               expand_tool_spec.GetPath().c_str(),
                               quoted_cmd_string.c_str());
         




More information about the lldb-commits mailing list