Skip to content

Commit 91bc123

Browse files
authored
Merge pull request #40 from brave/x86_linux_package_sym_deps
X86 linux package sym deps
2 parents 85cb8f2 + f6ecfbf commit 91bc123

File tree

2 files changed

+31
-22
lines changed

2 files changed

+31
-22
lines changed

app/linux/BUILD.gn

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ action("generate_breakpad_symbols") {
5555
"--clear",
5656
]
5757

58-
deps = [ "//third_party/breakpad:dump_syms" ]
58+
deps = [
59+
"//chrome", # To be sure brave executable is ready now
60+
"//third_party/breakpad:dump_syms",
61+
]
5962
}
6063

6164
group("symbol_dist_resources") {

tools/posix/generate_breakpad_symbols.py

+27-21
Original file line numberDiff line numberDiff line change
@@ -191,27 +191,33 @@ def _Worker():
191191
while True:
192192
binary = queue.get()
193193

194-
if options.verbose:
195-
with print_lock:
196-
print "Generating symbols for %s" % binary
197-
198-
if sys.platform == 'darwin':
199-
binary = GetDSYMBundle(options, binary)
200-
elif sys.platform == 'linux2':
201-
binary = GetSymbolPath(options, binary)
202-
203-
syms = GetCommandOutput([GetDumpSymsBinary(options.build_dir), '-r', '-c',
204-
binary])
205-
module_line = re.match("MODULE [^ ]+ [^ ]+ ([0-9A-F]+) (.*)\n", syms)
206-
output_path = os.path.join(options.symbols_dir, module_line.group(2),
207-
module_line.group(1))
208-
mkdir_p(output_path)
209-
symbol_file = "%s.sym" % module_line.group(2)
210-
f = open(os.path.join(output_path, symbol_file), 'w')
211-
f.write(syms)
212-
f.close()
213-
214-
queue.task_done()
194+
try:
195+
if options.verbose:
196+
with print_lock:
197+
print "Generating symbols for %s" % binary
198+
199+
if sys.platform == 'darwin':
200+
binary = GetDSYMBundle(options, binary)
201+
elif sys.platform == 'linux2':
202+
binary = GetSymbolPath(options, binary)
203+
204+
syms = GetCommandOutput([GetDumpSymsBinary(options.build_dir), '-r', '-c',
205+
binary])
206+
module_line = re.match("MODULE [^ ]+ [^ ]+ ([0-9A-F]+) (.*)\n", syms)
207+
output_path = os.path.join(options.symbols_dir, module_line.group(2),
208+
module_line.group(1))
209+
mkdir_p(output_path)
210+
symbol_file = "%s.sym" % module_line.group(2)
211+
f = open(os.path.join(output_path, symbol_file), 'w')
212+
f.write(syms)
213+
f.close()
214+
except Exception as inst:
215+
if options.verbose:
216+
with print_lock:
217+
print type(inst)
218+
print inst
219+
finally:
220+
queue.task_done()
215221

216222
for binary in binaries:
217223
queue.put(binary)

0 commit comments

Comments
 (0)