Alchsync: generate_breakpad_symbols.py
This commit is contained in:
@@ -31,7 +31,6 @@ $/LicenseInfo$
|
|||||||
import collections
|
import collections
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import itertools
|
import itertools
|
||||||
import operator
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
@@ -83,15 +82,10 @@ def main(configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, v
|
|||||||
def dump_module(m):
|
def dump_module(m):
|
||||||
print "dumping module '%s' with '%s'..." % (m, dump_syms_tool)
|
print "dumping module '%s' with '%s'..." % (m, dump_syms_tool)
|
||||||
dsym_full_path = m
|
dsym_full_path = m
|
||||||
|
child = subprocess.Popen([dump_syms_tool, dsym_full_path] , stdout=subprocess.PIPE)
|
||||||
tools = dump_syms_tool.split('|')
|
|
||||||
for tool in tools:
|
|
||||||
if tool:
|
|
||||||
if os.path.isfile(tool):
|
|
||||||
child = subprocess.Popen([tool, dsym_full_path] , stdout=subprocess.PIPE)
|
|
||||||
out, err = child.communicate()
|
out, err = child.communicate()
|
||||||
return (m,child.returncode, out, err)
|
return (m,child.returncode, out, err)
|
||||||
raise IOError('Failed to find dump_syms tool!')
|
|
||||||
|
|
||||||
modules = {}
|
modules = {}
|
||||||
|
|
||||||
@@ -154,7 +148,7 @@ def main(configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, v
|
|||||||
== os.path.splitext(os.path.basename(m))[0].lower()
|
== os.path.splitext(os.path.basename(m))[0].lower()
|
||||||
# there must be at least one .sym file in tarfile_members that matches
|
# there must be at least one .sym file in tarfile_members that matches
|
||||||
# each required module (ignoring file extensions)
|
# each required module (ignoring file extensions)
|
||||||
if not reduce(operator.or_, itertools.imap(match_module_basename, tarfile_members)):
|
if not any(itertools.imap(match_module_basename, tarfile_members)):
|
||||||
print >> sys.stderr, "failed to find required %s in generated %s" \
|
print >> sys.stderr, "failed to find required %s in generated %s" \
|
||||||
% (required_module, viewer_symbol_file)
|
% (required_module, viewer_symbol_file)
|
||||||
os.remove(viewer_symbol_file)
|
os.remove(viewer_symbol_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user