@@ -89,7 +89,7 @@ def open_llvm_symbolizer(self):
89
89
for hint in self .dsym_hints :
90
90
cmd .append ('--dsym-hint=%s' % hint )
91
91
if DEBUG :
92
- print ' ' .join (cmd )
92
+ print ( ' ' .join (cmd ) )
93
93
try :
94
94
result = subprocess .Popen (cmd , stdin = subprocess .PIPE ,
95
95
stdout = subprocess .PIPE ,
@@ -107,8 +107,8 @@ def symbolize(self, addr, binary, offset):
107
107
try :
108
108
symbolizer_input = '"%s" %s' % (binary , offset )
109
109
if DEBUG :
110
- print symbolizer_input
111
- print >> self .pipe .stdin , symbolizer_input
110
+ print ( symbolizer_input )
111
+ self .pipe .stdin . write ( "%s \n " % symbolizer_input )
112
112
while True :
113
113
function_name = self .pipe .stdout .readline ().rstrip ()
114
114
if not function_name :
@@ -153,7 +153,7 @@ def open_addr2line(self):
153
153
cmd += ['--demangle' ]
154
154
cmd += ['-e' , self .binary ]
155
155
if DEBUG :
156
- print ' ' .join (cmd )
156
+ print ( ' ' .join (cmd ) )
157
157
return subprocess .Popen (cmd ,
158
158
stdin = subprocess .PIPE , stdout = subprocess .PIPE ,
159
159
bufsize = 0 ,
@@ -165,8 +165,8 @@ def symbolize(self, addr, binary, offset):
165
165
return None
166
166
lines = []
167
167
try :
168
- print >> self .pipe .stdin , offset
169
- print >> self .pipe .stdin , self .output_terminator
168
+ self .pipe .stdin . write ( "%s \n " % offset )
169
+ self .pipe .stdin . write ( "%s \n " % self .output_terminator )
170
170
is_first_frame = True
171
171
while True :
172
172
function_name = self .pipe .stdout .readline ().rstrip ()
@@ -223,7 +223,7 @@ def __init__(self, addr, binary, arch):
223
223
224
224
def open_atos (self ):
225
225
if DEBUG :
226
- print 'atos -o %s -arch %s' % (self .binary , self .arch )
226
+ print ( 'atos -o %s -arch %s' % (self .binary , self .arch ) )
227
227
cmdline = ['atos' , '-o' , self .binary , '-arch' , self .arch ]
228
228
self .atos = UnbufferedLineConverter (cmdline , close_stderr = True )
229
229
@@ -238,7 +238,7 @@ def symbolize(self, addr, binary, offset):
238
238
# foo(type1, type2) (in object.name) (filename.cc:80)
239
239
match = re .match ('^(.*) \(in (.*)\) \((.*:\d*)\)$' , atos_line )
240
240
if DEBUG :
241
- print 'atos_line: ' , atos_line
241
+ print ( 'atos_line: ' , atos_line )
242
242
if match :
243
243
function_name = match .group (1 )
244
244
function_name = re .sub ('\(.*?\)' , '' , function_name )
@@ -352,7 +352,7 @@ def symbolize(self, addr, binary, offset):
352
352
function_name , file_name , line_no = res
353
353
result = ['%s in %s %s:%d' % (
354
354
addr , function_name , file_name , line_no )]
355
- print result
355
+ print ( result )
356
356
return result
357
357
else :
358
358
return None
@@ -438,7 +438,7 @@ def process_logfile(self):
438
438
self .frame_no = 0
439
439
for line in logfile :
440
440
processed = self .process_line (line )
441
- print '\n ' .join (processed )
441
+ print ( '\n ' .join (processed ) )
442
442
443
443
def process_line_echo (self , line ):
444
444
return [line .rstrip ()]
@@ -452,7 +452,7 @@ def process_line_posix(self, line):
452
452
if not match :
453
453
return [self .current_line ]
454
454
if DEBUG :
455
- print line
455
+ print ( line )
456
456
_ , frameno_str , addr , binary , offset = match .groups ()
457
457
arch = ""
458
458
# Arch can be embedded in the filename, e.g.: "libabc.dylib:x86_64h"
0 commit comments