[Lldb-commits] [lldb] r154977 - /lldb/branches/lldb-platform-work/source/Host/macosx/Host.mm
Viktor Kutuzov
vkutuzov at accesssoftek.com
Wed Apr 18 10:34:50 PDT 2012
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
More information about the lldb-commits
mailing list