[Lldb-commits] [PATCH] Convert remaining instances of '/bin/bash' to '/bin/sh'

Greg Clayton gclayton at apple.com
Tue Sep 3 11:47:58 PDT 2013


Looks good.

On Sep 3, 2013, at 10:59 AM, Ed Maste <emaste at freebsd.org> wrote:

>  Use #dfeine in lldb-defines.h per Greg Clayton
> 
> http://llvm-reviews.chandlerc.com/D1576
> 
> CHANGE SINCE LAST DIFF
>  http://llvm-reviews.chandlerc.com/D1576?vs=3970&id=3990#toc
> 
> Files:
>  include/lldb/Host/Host.h
>  include/lldb/lldb-defines.h
>  source/Interpreter/CommandInterpreter.cpp
>  source/Target/Process.cpp
>  test/functionalities/alias/TestAliases.py
>  test/pexpect-2.4/doc/index.html
>  test/pexpect-2.4/doc/index.template.html
> 
> Index: include/lldb/Host/Host.h
> ===================================================================
> --- include/lldb/Host/Host.h
> +++ include/lldb/Host/Host.h
> @@ -473,8 +473,7 @@
>                      int *signo_ptr,                // Pass NULL if you don't want the signal that caused the process to exit
>                      std::string *command_output,   // Pass NULL if you don't want the command output
>                      uint32_t timeout_sec,
> -                     const char *shell = "/bin/sh"
> -                    );
> +                     const char *shell = LLDB_DEFAULT_SHELL);
> 
>     static lldb::DataBufferSP
>     GetAuxvData (lldb_private::Process *process);
> Index: include/lldb/lldb-defines.h
> ===================================================================
> --- include/lldb/lldb-defines.h
> +++ include/lldb/lldb-defines.h
> @@ -33,6 +33,7 @@
> // LLDB defines
> //----------------------------------------------------------------------
> #define LLDB_GENERIC_ERROR              UINT32_MAX
> +#define LLDB_DEFAULT_SHELL              "/bin/sh"
> 
> //----------------------------------------------------------------------
> // Breakpoints
> Index: source/Interpreter/CommandInterpreter.cpp
> ===================================================================
> --- source/Interpreter/CommandInterpreter.cpp
> +++ source/Interpreter/CommandInterpreter.cpp
> @@ -318,7 +318,7 @@
> #if defined (__arm__)
>         ProcessAliasOptionsArgs (cmd_obj_sp, "--", alias_arguments_vector_sp);
> #else
> -        ProcessAliasOptionsArgs (cmd_obj_sp, "--shell=/bin/bash --", alias_arguments_vector_sp);
> +        ProcessAliasOptionsArgs (cmd_obj_sp, "--shell=" LLDB_DEFAULT_SHELL, alias_arguments_vector_sp);
> #endif
>         AddAlias ("r", cmd_obj_sp);
>         AddAlias ("run", cmd_obj_sp);
> Index: source/Target/Process.cpp
> ===================================================================
> --- source/Target/Process.cpp
> +++ source/Target/Process.cpp
> @@ -816,7 +816,7 @@
>             if (option_arg && option_arg[0])
>                 launch_info.SetShell (option_arg);
>             else
> -                launch_info.SetShell ("/bin/bash");
> +                launch_info.SetShell (LLDB_DEFAULT_SHELL);
>             break;
> 
>         case 'v':
> Index: test/functionalities/alias/TestAliases.py
> ===================================================================
> --- test/functionalities/alias/TestAliases.py
> +++ test/functionalities/alias/TestAliases.py
> @@ -109,16 +109,16 @@
> 
> 
>         self.expect ("help run",
> -                     substrs = [ "'run' is an abbreviation for 'process launch -c /bin/bash --'" ])
> +                     substrs = [ "'run' is an abbreviation for 'process launch -c /bin/sh --'" ])
> 
>         self.expect ("help -a run",
> -                     substrs = [ "'run' is an abbreviation for 'process launch -c /bin/bash --'" ])
> +                     substrs = [ "'run' is an abbreviation for 'process launch -c /bin/sh --'" ])
> 
>         self.expect ("help -a",
> -                     substrs = [ 'run', 'process launch -c /bin/bash' ])
> +                     substrs = [ 'run', 'process launch -c /bin/sh' ])
> 
>         self.expect ("help", matching=False,
> -                     substrs = [ "'run'", 'process launch -c /bin/bash' ])
> +                     substrs = [ "'run'", 'process launch -c /bin/sh' ])
> 
>         self.expect ("run",
>                      patterns = [ "Process .* launched: .*a.out" ])
> Index: test/pexpect-2.4/doc/index.html
> ===================================================================
> --- test/pexpect-2.4/doc/index.html
> +++ test/pexpect-2.4/doc/index.html
> @@ -362,7 +362,7 @@
> For example:
> 
> <pre>
> -    child = pexpect.spawn('/bin/bash -c "ls -l | grep LOG > log_list.txt"')
> +    child = pexpect.spawn('/bin/sh -c "ls -l | grep LOG > log_list.txt"')
>     child.expect(pexpect.EOF)
> </pre>
> 
> @@ -373,7 +373,7 @@
> 
> <pre>
>     shell_cmd = 'ls -l | grep LOG > log_list.txt'
> -    child = pexpect.spawn ('/bin/bash', ['-c', shell_cmd])
> +    child = pexpect.spawn ('/bin/sh', ['-c', shell_cmd])
>     child.expect (pexpect.EOF)
> </pre>
> 
> Index: test/pexpect-2.4/doc/index.template.html
> ===================================================================
> --- test/pexpect-2.4/doc/index.template.html
> +++ test/pexpect-2.4/doc/index.template.html
> @@ -362,7 +362,7 @@
> For example:
> 
> <pre>
> -    child = pexpect.spawn('/bin/bash -c "ls -l | grep LOG > log_list.txt"')
> +    child = pexpect.spawn('/bin/sh -c "ls -l | grep LOG > log_list.txt"')
>     child.expect(pexpect.EOF)
> </pre>
> 
> @@ -373,7 +373,7 @@
> 
> <pre>
>     shell_cmd = 'ls -l | grep LOG > log_list.txt'
> -    child = pexpect.spawn ('/bin/bash', ['-c', shell_cmd])
> +    child = pexpect.spawn ('/bin/sh', ['-c', shell_cmd])
>     child.expect (pexpect.EOF)
> </pre>
> <D1576.2.patch>_______________________________________________
> 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