<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">After juggling with the idea of <i class="">TextBasedCommandProcessorStyleCommandLineArgumentExpansion</i> </joke>, we settled for ShellExpandArguments()</div><div class=""><br class=""></div><div class="">r230077</div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 20, 2015, at 2:00 PM, Enrico Granata <<a href="mailto:egranata@apple.com" class="">egranata@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Fair enough - ShellExpand is not bad, but I feel like Arguments should be in there somewhere</div><div class=""><br class=""></div><div class="">Collective hivemind, something less verbose than ShellStyleExpandArguments maybe?</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 20, 2015, at 1:57 PM, Zachary Turner <<a href="mailto:zturner@google.com" class="">zturner@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">In a followup patch, would you mind changing the terminology from GlobArguments to something more descriptive, like ShellExpand? When I think glob I only think of wildcards, not full shell exnapsion. So I think it would be better if it were more explicit.<br class=""></div><br class=""><div class="gmail_quote">On Fri Feb 20 2015 at 1:51:26 PM Enrico Granata <<a href="mailto:egranata@apple.com" class="">egranata@apple.com</a>> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: enrico<br class="">
Date: Fri Feb 20 15:48:38 2015<br class="">
New Revision: 230065<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230065&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project?rev=230065&view=rev</a><br class="">
Log:<br class="">
Start the refactoring of globbing<br class="">
<br class="">
- Add Host::GlobArguments() to perform local-globbing<br class="">
I implemented this on OSX and Windows in terms of argdumper (Windows implementation is essentially the same as the OSX version + a change in binary name and some string magic)<br class="">
Other platforms did not specifically chime in, so I left it unimplemented for them for the time being. Please feel free to fill in the blanks<br class="">
<br class="">
- Add Platform::GlobArguments() to support remote-globbing<br class="">
For now, no feature change here - but now we have infrastructure to help GDBRemote targets to support globbing - and patches to that effect will follow<br class="">
<br class="">
No visible feature change<br class="">
<br class="">
<br class="">
Modified:<br class="">
lldb/trunk/include/lldb/Host/<u class=""></u>Host.h<br class="">
lldb/trunk/include/lldb/<u class=""></u>Target/Platform.h<br class="">
lldb/trunk/source/Host/<u class=""></u>freebsd/Host.cpp<br class="">
lldb/trunk/source/Host/linux/<u class=""></u>Host.cpp<br class="">
lldb/trunk/source/Host/macosx/<u class=""></u>Host.mm<br class="">
lldb/trunk/source/Host/<u class=""></u>windows/Host.cpp<br class="">
lldb/trunk/source/Target/<u class=""></u>Platform.cpp<br class="">
<br class="">
Modified: lldb/trunk/include/lldb/Host/<u class=""></u>Host.h<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Host.h?rev=230065&r1=230064&r2=230065&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project/lldb/trunk/include/<u class=""></u>lldb/Host/Host.h?rev=230065&<u class=""></u>r1=230064&r2=230065&view=diff</a><br class="">
==============================<u class=""></u>==============================<u class=""></u>==================<br class="">
--- lldb/trunk/include/lldb/Host/<u class=""></u>Host.h (original)<br class="">
+++ lldb/trunk/include/lldb/Host/<u class=""></u>Host.h Fri Feb 20 15:48:38 2015<br class="">
@@ -253,6 +253,16 @@ public:<br class="">
static Error<br class="">
LaunchProcess (ProcessLaunchInfo &launch_info);<br class="">
<br class="">
+ //----------------------------<u class=""></u>------------------------------<u class=""></u>--------<br class="">
+ /// Perform globbing of the command-line for this launch info<br class="">
+ /// This can potentially involve wildcard expansion<br class="">
+ // environment variable replacement, and whatever other<br class="">
+ // argument magic the platform defines as part of its typical<br class="">
+ // user experience<br class="">
+ //----------------------------<u class=""></u>------------------------------<u class=""></u>--------<br class="">
+ static Error<br class="">
+ GlobArguments (ProcessLaunchInfo &launch_info);<br class="">
+<br class="">
static Error<br class="">
RunShellCommand (const char *command, // Shouldn't be NULL<br class="">
const char *working_dir, // Pass NULL to use the current working directory<br class="">
<br class="">
Modified: lldb/trunk/include/lldb/<u class=""></u>Target/Platform.h<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=230065&r1=230064&r2=230065&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project/lldb/trunk/include/<u class=""></u>lldb/Target/Platform.h?rev=<u class=""></u>230065&r1=230064&r2=230065&<u class=""></u>view=diff</a><br class="">
==============================<u class=""></u>==============================<u class=""></u>==================<br class="">
--- lldb/trunk/include/lldb/<u class=""></u>Target/Platform.h (original)<br class="">
+++ lldb/trunk/include/lldb/<u class=""></u>Target/Platform.h Fri Feb 20 15:48:38 2015<br class="">
@@ -386,6 +386,16 @@ namespace lldb_private {<br class="">
LaunchProcess (ProcessLaunchInfo &launch_info);<br class="">
<br class="">
//----------------------------<u class=""></u>------------------------------<u class=""></u>--------<br class="">
+ /// Perform globbing of the command-line for this launch info<br class="">
+ /// This can potentially involve wildcard expansion<br class="">
+ // environment variable replacement, and whatever other<br class="">
+ // argument magic the platform defines as part of its typical<br class="">
+ // user experience<br class="">
+ //----------------------------<u class=""></u>------------------------------<u class=""></u>--------<br class="">
+ virtual Error<br class="">
+ GlobArguments (ProcessLaunchInfo &launch_info);<br class="">
+<br class="">
+ //----------------------------<u class=""></u>------------------------------<u class=""></u>--------<br class="">
/// Kill process on a platform.<br class="">
//----------------------------<u class=""></u>------------------------------<u class=""></u>--------<br class="">
virtual Error<br class="">
<br class="">
Modified: lldb/trunk/source/Host/<u class=""></u>freebsd/Host.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/freebsd/Host.cpp?rev=230065&r1=230064&r2=230065&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project/lldb/trunk/source/<u class=""></u>Host/freebsd/Host.cpp?rev=<u class=""></u>230065&r1=230064&r2=230065&<u class=""></u>view=diff</a><br class="">
==============================<u class=""></u>==============================<u class=""></u>==================<br class="">
--- lldb/trunk/source/Host/<u class=""></u>freebsd/Host.cpp (original)<br class="">
+++ lldb/trunk/source/Host/<u class=""></u>freebsd/Host.cpp Fri Feb 20 15:48:38 2015<br class="">
@@ -312,3 +312,9 @@ Host::GetUnixSignals ()<br class="">
return s_unix_signals_sp;<br class="">
}<br class="">
<br class="">
+Error<br class="">
+Host::GlobArguments (ProcessLaunchInfo &launch_info)<br class="">
+{<br class="">
+ return Error("unimplemented");<br class="">
+}<br class="">
+<br class="">
<br class="">
Modified: lldb/trunk/source/Host/linux/<u class=""></u>Host.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/Host.cpp?rev=230065&r1=230064&r2=230065&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project/lldb/trunk/source/<u class=""></u>Host/linux/Host.cpp?rev=<u class=""></u>230065&r1=230064&r2=230065&<u class=""></u>view=diff</a><br class="">
==============================<u class=""></u>==============================<u class=""></u>==================<br class="">
--- lldb/trunk/source/Host/linux/<u class=""></u>Host.cpp (original)<br class="">
+++ lldb/trunk/source/Host/linux/<u class=""></u>Host.cpp Fri Feb 20 15:48:38 2015<br class="">
@@ -417,3 +417,8 @@ Host::GetUnixSignals ()<br class="">
return s_unix_signals_sp;<br class="">
}<br class="">
<br class="">
+Error<br class="">
+Host::GlobArguments (ProcessLaunchInfo &launch_info)<br class="">
+{<br class="">
+ return Error("unimplemented");<br class="">
+}<br class="">
<br class="">
Modified: lldb/trunk/source/Host/macosx/<u class=""></u>Host.mm<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=230065&r1=230064&r2=230065&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project/lldb/trunk/source/<u class=""></u>Host/macosx/Host.mm?rev=<u class=""></u>230065&r1=230064&r2=230065&<u class=""></u>view=diff</a><br class="">
==============================<u class=""></u>==============================<u class=""></u>==================<br class="">
--- lldb/trunk/source/Host/macosx/<u class=""></u>Host.mm (original)<br class="">
+++ lldb/trunk/source/Host/macosx/<u class=""></u>Host.mm Fri Feb 20 15:48:38 2015<br class="">
@@ -45,6 +45,7 @@<br class="">
#include "lldb/Core/ModuleSpec.h"<br class="">
#include "lldb/Core/StreamFile.h"<br class="">
#include "lldb/Core/StreamString.h"<br class="">
+#include "lldb/Core/StructuredData.h"<br class="">
#include "lldb/Host/<u class=""></u>ConnectionFileDescriptor.h"<br class="">
#include "lldb/Host/Endian.h"<br class="">
#include "lldb/Host/FileSpec.h"<br class="">
@@ -1351,6 +1352,91 @@ Host::LaunchProcess (ProcessLaunchInfo &<br class="">
return error;<br class="">
}<br class="">
<br class="">
+Error<br class="">
+Host::GlobArguments (ProcessLaunchInfo &launch_info)<br class="">
+{<br class="">
+ Error error;<br class="">
+ if (launch_info.GetFlags().Test(<u class=""></u>eLaunchFlagGlobArguments))<br class="">
+ {<br class="">
+ FileSpec glob_tool_spec;<br class="">
+ if (!HostInfo::GetLLDBPath(lldb::<u class=""></u>ePathTypeSupportExecutableDir, glob_tool_spec))<br class="">
+ {<br class="">
+ error.SetErrorString("could not find argdumper tool");<br class="">
+ return error;<br class="">
+ }<br class="">
+ glob_tool_spec.<u class=""></u>AppendPathComponent("<u class=""></u>argdumper");<br class="">
+ if (!glob_tool_spec.Exists())<br class="">
+ {<br class="">
+ error.SetErrorString("could not find argdumper tool");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ std::string quoted_cmd_string;<br class="">
+ launch_info.GetArguments().<u class=""></u>GetQuotedCommandString(quoted_<u class=""></u>cmd_string);<br class="">
+ StreamString glob_command;<br class="">
+<br class="">
+ glob_command.Printf("%s %s",<br class="">
+ glob_tool_spec.GetPath().c_<u class=""></u>str(),<br class="">
+ quoted_cmd_string.c_str());<br class="">
+<br class="">
+ int status;<br class="">
+ std::string output;<br class="">
+ RunShellCommand(glob_command.<u class=""></u>GetData(), launch_info.<u class=""></u>GetWorkingDirectory(), &status, nullptr, &output, 10);<br class="">
+<br class="">
+ if (status != 0)<br class="">
+ {<br class="">
+ error.<u class=""></u>SetErrorStringWithFormat("<u class=""></u>argdumper exited with error %d", status);<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto data_sp = StructuredData::ParseJSON(<u class=""></u>output);<br class="">
+ if (!data_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto dict_sp = data_sp->GetAsDictionary();<br class="">
+ if (!data_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto args_sp = dict_sp-><u class=""></u>GetObjectForDotSeparatedPath("<u class=""></u>arguments");<br class="">
+ if (!args_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto args_array_sp = args_sp->GetAsArray();<br class="">
+ if (!args_array_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ launch_info.GetArguments().<u class=""></u>Clear();<br class="">
+<br class="">
+ for (size_t i = 0;<br class="">
+ i < args_array_sp->GetSize();<br class="">
+ i++)<br class="">
+ {<br class="">
+ auto item_sp = args_array_sp->GetItemAtIndex(<u class=""></u>i);<br class="">
+ if (!item_sp)<br class="">
+ continue;<br class="">
+ auto str_sp = item_sp->GetAsString();<br class="">
+ if (!str_sp)<br class="">
+ continue;<br class="">
+<br class="">
+ launch_info.GetArguments().<u class=""></u>AppendArgument(str_sp-><u class=""></u>GetValue().c_str());<br class="">
+ }<br class="">
+ }<br class="">
+<br class="">
+ return error;<br class="">
+}<br class="">
+<br class="">
HostThread<br class="">
Host::<u class=""></u>StartMonitoringChildProcess(<u class=""></u>Host::<u class=""></u>MonitorChildProcessCallback callback, void *callback_baton, lldb::pid_t pid, bool monitor_signals)<br class="">
{<br class="">
<br class="">
Modified: lldb/trunk/source/Host/<u class=""></u>windows/Host.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Host.cpp?rev=230065&r1=230064&r2=230065&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project/lldb/trunk/source/<u class=""></u>Host/windows/Host.cpp?rev=<u class=""></u>230065&r1=230064&r2=230065&<u class=""></u>view=diff</a><br class="">
==============================<u class=""></u>==============================<u class=""></u>==================<br class="">
--- lldb/trunk/source/Host/<u class=""></u>windows/Host.cpp (original)<br class="">
+++ lldb/trunk/source/Host/<u class=""></u>windows/Host.cpp Fri Feb 20 15:48:38 2015<br class="">
@@ -217,4 +217,90 @@ HostThread<br class="">
Host::<u class=""></u>StartMonitoringChildProcess(<u class=""></u>Host::<u class=""></u>MonitorChildProcessCallback callback, void *callback_baton, lldb::pid_t pid, bool monitor_signals)<br class="">
{<br class="">
return HostThread();<br class="">
-}<br class="">
\ No newline at end of file<br class="">
+}<br class="">
+<br class="">
+Error<br class="">
+Host::GlobArguments (ProcessLaunchInfo &launch_info)<br class="">
+{<br class="">
+ Error error;<br class="">
+ if (launch_info.GetFlags().Test(<u class=""></u>eLaunchFlagGlobArguments))<br class="">
+ {<br class="">
+ FileSpec glob_tool_spec;<br class="">
+ if (!HostInfo::GetLLDBPath(lldb::<u class=""></u>ePathTypeSupportExecutableDir, glob_tool_spec))<br class="">
+ {<br class="">
+ error.SetErrorString("could not find argdumper tool");<br class="">
+ return error;<br class="">
+ }<br class="">
+ glob_tool_spec.<u class=""></u>AppendPathComponent("<u class=""></u>argdumper.exe");<br class="">
+ if (!glob_tool_spec.Exists())<br class="">
+ {<br class="">
+ error.SetErrorString("could not find argdumper tool");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ std::string quoted_cmd_string;<br class="">
+ launch_info.GetArguments().<u class=""></u>GetQuotedCommandString(quoted_<u class=""></u>cmd_string);<br class="">
+ std::replace(quoted_cmd_<u class=""></u>string.begin(), quoted_cmd_string.end(), '<a href="smb://'" class="">\\'</a>, '/');<br class="">
+ StreamString glob_command;<br class="">
+<br class="">
+ glob_command.Printf("%s %s",<br class="">
+ glob_tool_spec.GetPath().c_<u class=""></u>str(),<br class="">
+ quoted_cmd_string.c_str());<br class="">
+<br class="">
+ int status;<br class="">
+ std::string output;<br class="">
+ RunShellCommand(glob_command.<u class=""></u>GetData(), launch_info.<u class=""></u>GetWorkingDirectory(), &status, nullptr, &output, 10);<br class="">
+<br class="">
+ if (status != 0)<br class="">
+ {<br class="">
+ error.<u class=""></u>SetErrorStringWithFormat("<u class=""></u>argdumper exited with error %d", status);<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto data_sp = StructuredData::ParseJSON(<u class=""></u>output);<br class="">
+ if (!data_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto dict_sp = data_sp->GetAsDictionary();<br class="">
+ if (!data_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto args_sp = dict_sp-><u class=""></u>GetObjectForDotSeparatedPath("<u class=""></u>arguments");<br class="">
+ if (!args_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ auto args_array_sp = args_sp->GetAsArray();<br class="">
+ if (!args_array_sp)<br class="">
+ {<br class="">
+ error.SetErrorString("invalid JSON");<br class="">
+ return error;<br class="">
+ }<br class="">
+<br class="">
+ launch_info.GetArguments().<u class=""></u>Clear();<br class="">
+<br class="">
+ for (size_t i = 0;<br class="">
+ i < args_array_sp->GetSize();<br class="">
+ i++)<br class="">
+ {<br class="">
+ auto item_sp = args_array_sp->GetItemAtIndex(<u class=""></u>i);<br class="">
+ if (!item_sp)<br class="">
+ continue;<br class="">
+ auto str_sp = item_sp->GetAsString();<br class="">
+ if (!str_sp)<br class="">
+ continue;<br class="">
+<br class="">
+ launch_info.GetArguments().<u class=""></u>AppendArgument(str_sp-><u class=""></u>GetValue().c_str());<br class="">
+ }<br class="">
+ }<br class="">
+<br class="">
+ return error;<br class="">
+}<br class="">
<br class="">
Modified: lldb/trunk/source/Target/<u class=""></u>Platform.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=230065&r1=230064&r2=230065&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-<u class=""></u>project/lldb/trunk/source/<u class=""></u>Target/Platform.cpp?rev=<u class=""></u>230065&r1=230064&r2=230065&<u class=""></u>view=diff</a><br class="">
==============================<u class=""></u>==============================<u class=""></u>==================<br class="">
--- lldb/trunk/source/Target/<u class=""></u>Platform.cpp (original)<br class="">
+++ lldb/trunk/source/Target/<u class=""></u>Platform.cpp Fri Feb 20 15:48:38 2015<br class="">
@@ -1116,87 +1116,9 @@ Platform::LaunchProcess (ProcessLaunchIn<br class="">
}<br class="">
else if (launch_info.GetFlags().Test(<u class=""></u>eLaunchFlagGlobArguments))<br class="">
{<br class="">
- FileSpec glob_tool_spec;<br class="">
- if (!HostInfo::GetLLDBPath(lldb::<u class=""></u>ePathTypeSupportExecutableDir, glob_tool_spec))<br class="">
- {<br class="">
- error.SetErrorString("could not find argdumper tool");<br class="">
+ error = GlobArguments(launch_info);<br class="">
+ if (error.Fail())<br class="">
return error;<br class="">
- }<br class="">
-#if defined(_WIN32)<br class="">
- glob_tool_spec.<u class=""></u>AppendPathComponent("<u class=""></u>argdumper.exe");<br class="">
-#else<br class="">
- glob_tool_spec.<u class=""></u>AppendPathComponent("<u class=""></u>argdumper");<br class="">
-#endif<br class="">
- if (!glob_tool_spec.Exists())<br class="">
- {<br class="">
- error.SetErrorString("could not find argdumper tool");<br class="">
- return error;<br class="">
- }<br class="">
-<br class="">
- std::string quoted_cmd_string;<br class="">
- launch_info.GetArguments().<u class=""></u>GetQuotedCommandString(quoted_<u class=""></u>cmd_string);<br class="">
-#if defined(_WIN32)<br class="">
- std::replace(quoted_cmd_<u class=""></u>string.begin(), quoted_cmd_string.end(), '<a href="smb://'" class="">\\'</a>, '/');<br class="">
-#endif<br class="">
- StreamString glob_command;<br class="">
-<br class="">
- glob_command.Printf("%s %s",<br class="">
- glob_tool_spec.GetPath().c_<u class=""></u>str(),<br class="">
- quoted_cmd_string.c_str());<br class="">
-<br class="">
- int status;<br class="">
- std::string output;<br class="">
- RunShellCommand(glob_command.<u class=""></u>GetData(), launch_info.<u class=""></u>GetWorkingDirectory(), &status, nullptr, &output, 10);<br class="">
-<br class="">
- if (status != 0)<br class="">
- {<br class="">
- error.<u class=""></u>SetErrorStringWithFormat("<u class=""></u>argdumper exited with error %d", status);<br class="">
- return error;<br class="">
- }<br class="">
-<br class="">
- auto data_sp = StructuredData::ParseJSON(<u class=""></u>output);<br class="">
- if (!data_sp)<br class="">
- {<br class="">
- error.SetErrorString("invalid JSON");<br class="">
- return error;<br class="">
- }<br class="">
-<br class="">
- auto dict_sp = data_sp->GetAsDictionary();<br class="">
- if (!data_sp)<br class="">
- {<br class="">
- error.SetErrorString("invalid JSON");<br class="">
- return error;<br class="">
- }<br class="">
-<br class="">
- auto args_sp = dict_sp-><u class=""></u>GetObjectForDotSeparatedPath("<u class=""></u>arguments");<br class="">
- if (!args_sp)<br class="">
- {<br class="">
- error.SetErrorString("invalid JSON");<br class="">
- return error;<br class="">
- }<br class="">
-<br class="">
- auto args_array_sp = args_sp->GetAsArray();<br class="">
- if (!args_array_sp)<br class="">
- {<br class="">
- error.SetErrorString("invalid JSON");<br class="">
- return error;<br class="">
- }<br class="">
-<br class="">
- launch_info.GetArguments().<u class=""></u>Clear();<br class="">
-<br class="">
- for (size_t i = 0;<br class="">
- i < args_array_sp->GetSize();<br class="">
- i++)<br class="">
- {<br class="">
- auto item_sp = args_array_sp->GetItemAtIndex(<u class=""></u>i);<br class="">
- if (!item_sp)<br class="">
- continue;<br class="">
- auto str_sp = item_sp->GetAsString();<br class="">
- if (!str_sp)<br class="">
- continue;<br class="">
-<br class="">
- launch_info.GetArguments().<u class=""></u>AppendArgument(str_sp-><u class=""></u>GetValue().c_str());<br class="">
- }<br class="">
}<br class="">
<br class="">
if (log)<br class="">
@@ -1210,6 +1132,14 @@ Platform::LaunchProcess (ProcessLaunchIn<br class="">
}<br class="">
<br class="">
Error<br class="">
+Platform::GlobArguments (ProcessLaunchInfo &launch_info)<br class="">
+{<br class="">
+ if (IsHost())<br class="">
+ return Host::GlobArguments(launch_<u class=""></u>info);<br class="">
+ return Error("base lldb_private::Platform class can't glob arguments");<br class="">
+}<br class="">
+<br class="">
+Error<br class="">
Platform::KillProcess (const lldb::pid_t pid)<br class="">
{<br class="">
Log *log(lldb_private::<u class=""></u>GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM));<br class="">
<br class="">
<br class="">
______________________________<u class=""></u>_________________<br class="">
lldb-commits mailing list<br class="">
<a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank" class="">lldb-commits@cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank" class="">http://lists.cs.uiuc.edu/<u class=""></u>mailman/listinfo/lldb-commits</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""><div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks,</div><div class=""><i class="">- Enrico</i><br class="">📩 egranata@<font color="#ff2600" class=""></font>.com ☎️ 27683</div><div class=""><br class=""></div></div></div></div></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></div>_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@cs.uiuc.edu" class="">lldb-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits<br class=""></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks,</div><div class=""><i class="">- Enrico</i><br class="">📩 egranata@<font color="#ff2600" class=""></font>.com ☎️ 27683</div><div class=""><br class=""></div></div></div></div></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>