[Lldb-commits] [lldb] r220217 - Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.
Eric Christopher
echristo at gmail.com
Tue Oct 21 13:53:53 PDT 2014
> char shell_resolved_path[PATH_MAX];
This was then unused. I've removed it.
-eric
> -
> - if (localhost)
> - {
> - FileSpec shell_filespec (shell_executable, true);
> -
> - if (!shell_filespec.Exists())
> - {
> - // Resolve the path in case we just got "bash", "sh" or "tcsh"
> - if (!shell_filespec.ResolveExecutableLocation ())
> - {
> - error.SetErrorStringWithFormat("invalid shell path '%s'", shell_executable);
> - return false;
> - }
> - }
> - shell_filespec.GetPath (shell_resolved_path, sizeof(shell_resolved_path));
> - shell_executable = shell_resolved_path;
> - }
> + std::string shell_executable = m_shell.GetPath();
>
> const char **argv = GetArguments().GetConstArgumentVector ();
> if (argv == NULL || argv[0] == NULL)
> return false;
> Args shell_arguments;
> std::string safe_arg;
> - shell_arguments.AppendArgument (shell_executable);
> + shell_arguments.AppendArgument (shell_executable.c_str());
> shell_arguments.AppendArgument ("-c");
> StreamString shell_command;
> if (will_debug)
> @@ -494,7 +471,7 @@ ProcessLaunchInfo::ConvertArgumentsForLa
> }
> }
> shell_arguments.AppendArgument (shell_command.GetString().c_str());
> - m_executable.SetFile(shell_executable, false);
> + m_executable = m_shell;
> m_arguments = shell_arguments;
> return true;
> }
>
> Modified: lldb/trunk/source/Target/Target.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=220217&r1=220216&r2=220217&view=diff
> ==============================================================================
> --- lldb/trunk/source/Target/Target.cpp (original)
> +++ lldb/trunk/source/Target/Target.cpp Mon Oct 20 12:46:43 2014
> @@ -35,6 +35,7 @@
> #include "lldb/Core/ValueObject.h"
> #include "lldb/Expression/ClangASTSource.h"
> #include "lldb/Expression/ClangUserExpression.h"
> +#include "lldb/Host/FileSpec.h"
> #include "lldb/Host/Host.h"
> #include "lldb/Interpreter/CommandInterpreter.h"
> #include "lldb/Interpreter/CommandReturnObject.h"
> @@ -2477,7 +2478,7 @@ Target::Launch (Listener &listener, Proc
> }
> else if (state == eStateExited)
> {
> - bool with_shell = launch_info.GetShell();
> + bool with_shell = !!launch_info.GetShell();
> const int exit_status = m_process_sp->GetExitStatus();
> const char *exit_desc = m_process_sp->GetExitDescription();
> #define LAUNCH_SHELL_MESSAGE "\n'r' and 'run' are aliases that default to launching through a shell.\nTry launching without going through a shell by using 'process launch'."
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list