File tree Expand file tree Collapse file tree 9 files changed +28
-17
lines changed
Expand file tree Collapse file tree 9 files changed +28
-17
lines changed Original file line number Diff line number Diff line change 1616# available.
1717#----------------------------------------------------------------------
1818
19- import commands
2019from __future__ import print_function
2120
2221import optparse
Original file line number Diff line number Diff line change 1717#----------------------------------------------------------------------
1818
1919import binascii
20- import commands
20+ import subprocess
2121import json
2222import math
2323import optparse
Original file line number Diff line number Diff line change 1010from __future__ import print_function
1111
1212import lldb
13- import commands
1413import optparse
1514import os
1615import shlex
Original file line number Diff line number Diff line change 99# (lldb) command script import /path/to/cmdtemplate.py
1010#----------------------------------------------------------------------
1111
12- import commands
1312from __future__ import print_function
1413
1514import platform
1615import os
1716import re
1817import sys
1918
19+ if sys .version_info .major == 2 :
20+ import commands as subprocess
21+ else :
22+ import subprocess
23+
2024try :
2125 # Just try for LLDB in case PYTHONPATH is already correctly setup
2226 import lldb
2630 platform_system = platform .system ()
2731 if platform_system == 'Darwin' :
2832 # On Darwin, try the currently selected Xcode directory
29- xcode_dir = commands .getoutput ("xcode-select --print-path" )
33+ xcode_dir = subprocess .getoutput ("xcode-select --print-path" )
3034 if xcode_dir :
3135 lldb_python_dirs .append (
3236 os .path .realpath (
5357 print ("error: couldn't locate the 'lldb' module, please set PYTHONPATH correctly" )
5458 sys .exit (1 )
5559
56- import commands
5760import optparse
5861import shlex
5962import string
Original file line number Diff line number Diff line change 88# export PYTHONPATH=/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python
99#----------------------------------------------------------------------
1010
11- import commands
1211from __future__ import print_function
1312
1413import optparse
2019import time
2120import types
2221
22+ if sys .version_info .major == 2 :
23+ import commands as subprocess
24+ else :
25+ import subprocess
26+
2327#----------------------------------------------------------------------
2428# Code that auto imports LLDB
2529#----------------------------------------------------------------------
3236 platform_system = platform .system ()
3337 if platform_system == 'Darwin' :
3438 # On Darwin, try the currently selected Xcode directory
35- xcode_dir = commands .getoutput ("xcode-select --print-path" )
39+ xcode_dir = subprocess .getoutput ("xcode-select --print-path" )
3640 if xcode_dir :
3741 lldb_python_dirs .append (
3842 os .path .realpath (
@@ -303,7 +307,7 @@ def __init__(self, pid):
303307 self .value = dict ()
304308
305309 def Measure (self ):
306- output = commands .getoutput (self .command ).split ("\n " )[- 1 ]
310+ output = subprocess .getoutput (self .command ).split ("\n " )[- 1 ]
307311 values = re .split ('[-+\s]+' , output )
308312 for (idx , stat ) in enumerate (values ):
309313 multiplier = 1
Original file line number Diff line number Diff line change 88# export PYTHONPATH=/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python
99#----------------------------------------------------------------------
1010
11- import commands
1211from __future__ import print_function
1312
1413import optparse
1514import os
1615import platform
1716import sys
1817
18+ if sys .version_info .major == 2 :
19+ import commands as subprocess
20+ else :
21+ import subprocess
22+
1923#----------------------------------------------------------------------
2024# Code that auto imports LLDB
2125#----------------------------------------------------------------------
2832 platform_system = platform .system ()
2933 if platform_system == 'Darwin' :
3034 # On Darwin, try the currently selected Xcode directory
31- xcode_dir = commands .getoutput ("xcode-select --print-path" )
35+ xcode_dir = subprocess .getoutput ("xcode-select --print-path" )
3236 if xcode_dir :
3337 lldb_python_dirs .append (
3438 os .path .realpath (
Original file line number Diff line number Diff line change 11#!/usr/bin/python
22from __future__ import print_function
33import lldb
4- import commands
54import optparse
65import shlex
76
Original file line number Diff line number Diff line change 99# (lldb) command script import /path/to/cmdtemplate.py
1010#----------------------------------------------------------------------
1111
12- import commands
1312from __future__ import print_function
1413
1514import platform
1817import signal
1918import sys
2019
20+ if sys .version_info .major == 2 :
21+ import commands as subprocess
22+ else :
23+ import subprocess
24+
2125try :
2226 # Just try for LLDB in case PYTHONPATH is already correctly setup
2327 import lldb
2731 platform_system = platform .system ()
2832 if platform_system == 'Darwin' :
2933 # On Darwin, try the currently selected Xcode directory
30- xcode_dir = commands .getoutput ("xcode-select --print-path" )
34+ xcode_dir = subprocess .getoutput ("xcode-select --print-path" )
3135 if xcode_dir :
3236 lldb_python_dirs .append (
3337 os .path .realpath (
5458 print ("error: couldn't locate the 'lldb' module, please set PYTHONPATH correctly" )
5559 sys .exit (1 )
5660
57- import commands
5861import optparse
5962import shlex
6063import time
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
3- import commands
3+ import subprocess
44import optparse
55import os
66import os .path
1111def extract_exe_symbol_names (arch , exe_path , match_str ):
1212 command = 'dsymutil --arch %s -s "%s" | grep "%s" | colrm 1 69' % (
1313 arch , exe_path , match_str )
14- (command_exit_status , command_output ) = commands .getstatusoutput (command )
14+ (command_exit_status , command_output ) = subprocess .getstatusoutput (command )
1515 if command_exit_status == 0 :
1616 if command_output :
1717 return command_output [0 :- 1 ].split ("'\n " )
You can’t perform that action at this time.
0 commit comments