Index: native_client_sdk/src/tools/run.py |
diff --git a/native_client_sdk/src/tools/run.py b/native_client_sdk/src/tools/run.py |
index e2af3595813fcc9d4967c6f822b1c2c9c7a3eaf7..fb99b6d34a554656033a152b727e5f11c9aa39d0 100755 |
--- a/native_client_sdk/src/tools/run.py |
+++ b/native_client_sdk/src/tools/run.py |
@@ -67,11 +67,15 @@ def main(args): |
# If any debug args are passed in, assume we want to debug |
if options.debug: |
- if getos.GetPlatform() != 'win': |
+ if getos.GetPlatform() == 'linux': |
cmd = ['xterm', '-title', 'NaCl Debugger', '-e'] |
+ cmd += options.debug |
+ elif getos.GetPlatform() == 'mac': |
+ cmd = ['osascript', '-e', |
+ 'tell application "Terminal" to do script "%s"' % |
+ ' '.join(r'\"%s\"' % x for x in options.debug)] |
else: |
cmd = [] |
- cmd += options.debug |
print 'Starting debugger: ' + ' '.join(cmd) |
debug_process = subprocess.Popen(cmd, env=env) |
else: |