[Lldb-commits] [lldb] r154977 - /lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm

Enrico Granata egranata at apple.com
Wed Apr 18 11:37:42 PDT 2012


Seems to make sense. Thanks for pointing it out:

Sending        source/Host/common/Host.cpp
Sending        source/Host/macosx/Host.mm
Transmitting file data ..
Committed revision 155023.

Enrico Granata
✉ egranata@.com
✆ (four oh eight) 862-7683

On Apr 18, 2012, at 10:34 AM, Viktor Kutuzov wrote:

> Hi Enrico,
> 
> I would like to propose to move this code into the common Host.cpp (source/Host/Host/common/Host.cpp). Your changes do not contain any platform dependent stuff and it should work on any platform there.
> What do you think?
> 
> Thanks.
> Viktor.
> 
> PS. exit_code type => uint32_t
> 
> -----Original Message-----
> From: lldb-commits-bounces at cs.uiuc.edu [mailto:lldb-commits-bounces at cs.uiuc.edu] On Behalf Of Enrico Granata
> Sent: Tuesday, April 17, 2012 7:03 PM
> To: lldb-commits at cs.uiuc.edu
> Subject: [Lldb-commits] [lldb] r154977 - /lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
> 
> Author: enrico
> Date: Tue Apr 17 21:02:59 2012
> New Revision: 154977
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=154977&view=rev
> Log:
> Using the new enhanced RunShellCommand() to implement Host::RunProgramAndGetExitCode() - this centralizes the code we use to launch a process across the board. next step is to enable the remote platforms to launch a process via the RunShellCommand() and obtain all the information that that call is able to provide
> 
> Modified:
>    lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
> 
> Modified: lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
> URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm?rev=154977&r1=154976&r2=154977&view=diff
> ==============================================================================
> --- lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm (original)
> +++ lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm Tue Apr 
> +++ 17 21:02:59 2012
> @@ -1847,7 +1847,11 @@
> uint32_t
> Host::RunProgramAndGetExitCode (const char *cmd_line)  {
> -    return ::system(cmd_line);
> +    int exit_code;
> +    Error err(RunShellCommand(cmd_line, NULL, &exit_code, NULL, NULL, 10));
> +    if (err.Fail())
> +        return UINT32_MAX;
> +    return exit_code;
> }
> 
> uint32_t
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20120418/aa81e898/attachment.html>


More information about the lldb-commits mailing list