Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X86 linux package sym deps #40

Merged
merged 2 commits into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ action("generate_breakpad_symbols") {
"--clear",
]

deps = [ "//third_party/breakpad:dump_syms" ]
deps = [
"//chrome", # To be sure brave executable is ready now
"//third_party/breakpad:dump_syms",
]
}

group("symbol_dist_resources") {
Expand Down
48 changes: 27 additions & 21 deletions tools/posix/generate_breakpad_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,27 +191,33 @@ def _Worker():
while True:
binary = queue.get()

if options.verbose:
with print_lock:
print "Generating symbols for %s" % binary

if sys.platform == 'darwin':
binary = GetDSYMBundle(options, binary)
elif sys.platform == 'linux2':
binary = GetSymbolPath(options, binary)

syms = GetCommandOutput([GetDumpSymsBinary(options.build_dir), '-r', '-c',
binary])
module_line = re.match("MODULE [^ ]+ [^ ]+ ([0-9A-F]+) (.*)\n", syms)
output_path = os.path.join(options.symbols_dir, module_line.group(2),
module_line.group(1))
mkdir_p(output_path)
symbol_file = "%s.sym" % module_line.group(2)
f = open(os.path.join(output_path, symbol_file), 'w')
f.write(syms)
f.close()

queue.task_done()
try:
if options.verbose:
with print_lock:
print "Generating symbols for %s" % binary

if sys.platform == 'darwin':
binary = GetDSYMBundle(options, binary)
elif sys.platform == 'linux2':
binary = GetSymbolPath(options, binary)

syms = GetCommandOutput([GetDumpSymsBinary(options.build_dir), '-r', '-c',
binary])
module_line = re.match("MODULE [^ ]+ [^ ]+ ([0-9A-F]+) (.*)\n", syms)
output_path = os.path.join(options.symbols_dir, module_line.group(2),
module_line.group(1))
mkdir_p(output_path)
symbol_file = "%s.sym" % module_line.group(2)
f = open(os.path.join(output_path, symbol_file), 'w')
f.write(syms)
f.close()
except Exception as inst:
if options.verbose:
with print_lock:
print type(inst)
print inst
finally:
queue.task_done()

for binary in binaries:
queue.put(binary)
Expand Down