diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/API/SBLaunchInfo.cpp | 8 | ||||
-rw-r--r-- | lldb/source/Host/freebsd/Host.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/linux/Host.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/macosx/Host.mm | 24 | ||||
-rw-r--r-- | lldb/source/Host/windows/Host.cpp | 22 | ||||
-rw-r--r-- | lldb/source/Target/Platform.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Target/ProcessLaunchInfo.cpp | 8 |
8 files changed, 43 insertions, 43 deletions
diff --git a/lldb/source/API/SBLaunchInfo.cpp b/lldb/source/API/SBLaunchInfo.cpp index 681f5fe0ebf..82289ba0885 100644 --- a/lldb/source/API/SBLaunchInfo.cpp +++ b/lldb/source/API/SBLaunchInfo.cpp @@ -224,15 +224,15 @@ SBLaunchInfo::SetShell (const char * path) } bool -SBLaunchInfo::GetGlobArguments () +SBLaunchInfo::GetShellExpandArguments () { - return m_opaque_sp->GetGlobArguments(); + return m_opaque_sp->GetShellExpandArguments(); } void -SBLaunchInfo::SetGlobArguments (bool glob) +SBLaunchInfo::SetShellExpandArguments (bool expand) { - m_opaque_sp->SetGlobArguments(glob); + m_opaque_sp->SetShellExpandArguments(expand); } uint32_t diff --git a/lldb/source/Host/freebsd/Host.cpp b/lldb/source/Host/freebsd/Host.cpp index 56e068430d6..e2bc1dc6232 100644 --- a/lldb/source/Host/freebsd/Host.cpp +++ b/lldb/source/Host/freebsd/Host.cpp @@ -313,7 +313,7 @@ Host::GetUnixSignals () } Error -Host::GlobArguments (ProcessLaunchInfo &launch_info) +Host::ShellExpandArguments (ProcessLaunchInfo &launch_info) { return Error("unimplemented"); } diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp index 90898c77f1b..edad8f7731e 100644 --- a/lldb/source/Host/linux/Host.cpp +++ b/lldb/source/Host/linux/Host.cpp @@ -418,7 +418,7 @@ Host::GetUnixSignals () } Error -Host::GlobArguments (ProcessLaunchInfo &launch_info) +Host::ShellExpandArguments (ProcessLaunchInfo &launch_info) { return Error("unimplemented"); } diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/Host.mm index 1e7c0de7a5e..512d3243e8e 100644 --- a/lldb/source/Host/macosx/Host.mm +++ b/lldb/source/Host/macosx/Host.mm @@ -1353,19 +1353,19 @@ Host::LaunchProcess (ProcessLaunchInfo &launch_info) } Error -Host::GlobArguments (ProcessLaunchInfo &launch_info) +Host::ShellExpandArguments (ProcessLaunchInfo &launch_info) { Error error; - if (launch_info.GetFlags().Test(eLaunchFlagGlobArguments)) + if (launch_info.GetFlags().Test(eLaunchFlagShellExpandArguments)) { - FileSpec glob_tool_spec; - if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, glob_tool_spec)) + FileSpec expand_tool_spec; + if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, expand_tool_spec)) { error.SetErrorString("could not find argdumper tool"); return error; } - glob_tool_spec.AppendPathComponent("argdumper"); - if (!glob_tool_spec.Exists()) + expand_tool_spec.AppendPathComponent("argdumper"); + if (!expand_tool_spec.Exists()) { error.SetErrorString("could not find argdumper tool"); return error; @@ -1373,15 +1373,15 @@ Host::GlobArguments (ProcessLaunchInfo &launch_info) std::string quoted_cmd_string; launch_info.GetArguments().GetQuotedCommandString(quoted_cmd_string); - StreamString glob_command; + StreamString expand_command; - glob_command.Printf("%s %s", - glob_tool_spec.GetPath().c_str(), - quoted_cmd_string.c_str()); + expand_command.Printf("%s %s", + expand_tool_spec.GetPath().c_str(), + quoted_cmd_string.c_str()); int status; std::string output; - RunShellCommand(glob_command.GetData(), launch_info.GetWorkingDirectory(), &status, nullptr, &output, 10); + RunShellCommand(expand_command.GetData(), launch_info.GetWorkingDirectory(), &status, nullptr, &output, 10); if (status != 0) { @@ -1409,7 +1409,7 @@ Host::GlobArguments (ProcessLaunchInfo &launch_info) error.SetErrorString("invalid JSON"); return error; } - + auto args_array_sp = args_sp->GetAsArray(); if (!args_array_sp) { diff --git a/lldb/source/Host/windows/Host.cpp b/lldb/source/Host/windows/Host.cpp index afd3e4266aa..052e6aa81ec 100644 --- a/lldb/source/Host/windows/Host.cpp +++ b/lldb/source/Host/windows/Host.cpp @@ -220,19 +220,19 @@ Host::StartMonitoringChildProcess(Host::MonitorChildProcessCallback callback, vo } Error -Host::GlobArguments (ProcessLaunchInfo &launch_info) +Host::ShellExpandArguments (ProcessLaunchInfo &launch_info) { Error error; - if (launch_info.GetFlags().Test(eLaunchFlagGlobArguments)) + if (launch_info.GetFlags().Test(eLaunchFlagShellExpandArguments)) { - FileSpec glob_tool_spec; - if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, glob_tool_spec)) + FileSpec expand_tool_spec; + if (!HostInfo::GetLLDBPath(lldb::ePathTypeSupportExecutableDir, expand_tool_spec)) { error.SetErrorString("could not find argdumper tool"); return error; } - glob_tool_spec.AppendPathComponent("argdumper.exe"); - if (!glob_tool_spec.Exists()) + expand_tool_spec.AppendPathComponent("argdumper.exe"); + if (!expand_tool_spec.Exists()) { error.SetErrorString("could not find argdumper tool"); return error; @@ -241,15 +241,15 @@ Host::GlobArguments (ProcessLaunchInfo &launch_info) std::string quoted_cmd_string; launch_info.GetArguments().GetQuotedCommandString(quoted_cmd_string); std::replace(quoted_cmd_string.begin(), quoted_cmd_string.end(), '\\', '/'); - StreamString glob_command; + StreamString expand_command; - glob_command.Printf("%s %s", - glob_tool_spec.GetPath().c_str(), - quoted_cmd_string.c_str()); + expand_command.Printf("%s %s", + expand_tool_spec.GetPath().c_str(), + quoted_cmd_string.c_str()); int status; std::string output; - RunShellCommand(glob_command.GetData(), launch_info.GetWorkingDirectory(), &status, nullptr, &output, 10); + RunShellCommand(expand_command.GetData(), launch_info.GetWorkingDirectory(), &status, nullptr, &output, 10); if (status != 0) { diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 669799f9df3..03a5edf8bb3 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1114,9 +1114,9 @@ Platform::LaunchProcess (ProcessLaunchInfo &launch_info) num_resumes)) return error; } - else if (launch_info.GetFlags().Test(eLaunchFlagGlobArguments)) + else if (launch_info.GetFlags().Test(eLaunchFlagShellExpandArguments)) { - error = GlobArguments(launch_info); + error = ShellExpandArguments(launch_info); if (error.Fail()) return error; } @@ -1132,11 +1132,11 @@ Platform::LaunchProcess (ProcessLaunchInfo &launch_info) } Error -Platform::GlobArguments (ProcessLaunchInfo &launch_info) +Platform::ShellExpandArguments (ProcessLaunchInfo &launch_info) { if (IsHost()) - return Host::GlobArguments(launch_info); - return Error("base lldb_private::Platform class can't glob arguments"); + return Host::ShellExpandArguments(launch_info); + return Error("base lldb_private::Platform class can't expand arguments"); } Error diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index a85613d9e08..30f310aeefd 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -491,14 +491,14 @@ ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *op break; } - case 'G': // Glob args. + case 'X': // shell expand args. { bool success; - const bool glob_args = Args::StringToBoolean (option_arg, true, &success); + const bool expand_args = Args::StringToBoolean (option_arg, true, &success); if (success) - launch_info.SetGlobArguments(glob_args); + launch_info.SetShellExpandArguments(expand_args); else - error.SetErrorStringWithFormat ("Invalid boolean value for glob-args option: '%s'", option_arg ? option_arg : "<null>"); + error.SetErrorStringWithFormat ("Invalid boolean value for shell-expand-args option: '%s'", option_arg ? option_arg : "<null>"); break; } @@ -538,7 +538,7 @@ ProcessLaunchCommandOptions::g_option_table[] = { LLDB_OPT_SET_2 , false, "tty", 't', OptionParser::eNoArgument, NULL, NULL, 0, eArgTypeNone, "Start the process in a terminal (not supported on all platforms)."}, { LLDB_OPT_SET_3 , false, "no-stdio", 'n', OptionParser::eNoArgument, NULL, NULL, 0, eArgTypeNone, "Do not set up for terminal I/O to go to running process."}, -{ LLDB_OPT_SET_4, false, "glob-args", 'G', OptionParser::eRequiredArgument, NULL, NULL, 0, eArgTypeBoolean, "Set whether to glob arguments to the process when launching."}, +{ LLDB_OPT_SET_4, false, "shell-expand-args", 'X', OptionParser::eRequiredArgument, NULL, NULL, 0, eArgTypeBoolean, "Set whether to shell expand arguments to the process when launching."}, { 0 , false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL } }; diff --git a/lldb/source/Target/ProcessLaunchInfo.cpp b/lldb/source/Target/ProcessLaunchInfo.cpp index 4360cafaaa8..d2e4febb280 100644 --- a/lldb/source/Target/ProcessLaunchInfo.cpp +++ b/lldb/source/Target/ProcessLaunchInfo.cpp @@ -211,12 +211,12 @@ ProcessLaunchInfo::SetLaunchInSeparateProcessGroup (bool separate) } void -ProcessLaunchInfo::SetGlobArguments (bool glob) +ProcessLaunchInfo::SetShellExpandArguments (bool expand) { - if (glob) - m_flags.Set(lldb::eLaunchFlagGlobArguments); + if (expand) + m_flags.Set(lldb::eLaunchFlagShellExpandArguments); else - m_flags.Clear(lldb::eLaunchFlagGlobArguments); + m_flags.Clear(lldb::eLaunchFlagShellExpandArguments); } void |