File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -379,9 +379,9 @@ def symbols_from(object_file):
379
379
cmd = ["objdump" , "--syms" , object_file ]
380
380
proc = subprocess .Popen (cmd , universal_newlines = True ,
381
381
stdout = subprocess .PIPE , stderr = subprocess .STDOUT )
382
- if proc .wait ():
383
- logging . error ( "`%s` failed. Output: \n %s" , " " . join ( cmd ),
384
- proc . stdout . read () )
382
+ proc_output , _ = proc .communicate ()
383
+ if proc . returncode :
384
+ logging . error ( "`%s` failed. Output: \n %s" , " " . join ( cmd ), proc_output )
385
385
exit (1 )
386
386
pat = re .compile (r"(?P<addr>[^\s]+)\s+"
387
387
r"(?P<flags>[lgu! ][w ][C ][W ][Ii ][Dd ][FfO ])\s+"
@@ -391,7 +391,7 @@ def symbols_from(object_file):
391
391
)
392
392
matching = False
393
393
ret = {}
394
- for line in proc . stdout . read () .splitlines ():
394
+ for line in proc_output .splitlines ():
395
395
if not line :
396
396
continue
397
397
if not matching and re .match ("SYMBOL TABLE:" , line ):
You can’t perform that action at this time.
0 commit comments