electron/patches/chromium/verbose_generate_breakpad_symbols.patch

85 lines
3.6 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@github.com>
Date: Thu, 18 Oct 2018 17:08:28 -0700
Subject: verbose_generate_breakpad_symbols.patch
Temporarily add additional debugging statements to
generate_breakpad_symbols.py to determine why it is hanging.
diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
2019-05-13 18:49:01 +00:00
index dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d..4249d7b26f9037b60a40e073f56037f9ff036138 100755
--- a/components/crash/content/tools/generate_breakpad_symbols.py
+++ b/components/crash/content/tools/generate_breakpad_symbols.py
2019-01-16 18:07:52 +00:00
@@ -60,7 +60,10 @@ def Resolve(path, exe_path, loader_path, rpaths):
return path
-def GetSharedLibraryDependenciesLinux(binary):
+def GetSharedLibraryDependenciesLinux(binary, options):
+ if options.verbose:
+ print "GetSharedLibraryDependencies for %s" % binary
+
2019-01-16 18:07:52 +00:00
"""Return absolute paths to all shared library dependencies of the binary.
This implementation assumes that we're running on a Linux system."""
2019-05-13 18:49:01 +00:00
@@ -71,6 +74,9 @@ def GetSharedLibraryDependenciesLinux(binary):
m = lib_re.match(line)
if m:
2019-01-16 18:07:52 +00:00
result.append(os.path.abspath(m.group(1)))
+ if options.verbose:
+ print "Done GetSharedLibraryDependencies for %s" % binary
+ print result
return result
2019-05-13 18:49:01 +00:00
@@ -183,7 +189,7 @@ def GetSharedLibraryDependencies(options, binary, exe_path):
2019-01-16 18:07:52 +00:00
"""Return absolute paths to all shared library dependencies of the binary."""
deps = []
2019-05-13 18:49:01 +00:00
if options.platform == 'linux2':
- deps = GetSharedLibraryDependenciesLinux(binary)
+ deps = GetSharedLibraryDependenciesLinux(binary, options)
2019-05-13 18:49:01 +00:00
elif options.platform == 'android':
deps = GetSharedLibraryDependenciesAndroid(binary)
elif options.platform == 'darwin':
@@ -257,7 +263,8 @@ def CreateSymbolDir(options, output_dir):
def GenerateSymbols(options, binaries):
"""Dumps the symbols of binary and places them in the given directory."""
-
+ if options.verbose:
+ print "Generating symbols for %s " % (' '.join(binaries))
queue = Queue.Queue()
print_lock = threading.Lock()
2019-05-13 18:49:01 +00:00
@@ -277,8 +284,15 @@ def GenerateSymbols(options, binaries):
reason = "Could not locate dump_syms executable."
break
+ if options.verbose:
+ with print_lock:
+ print "GetBinaryInfoFromHeaderInfo for %s" % (binary)
binary_info = GetBinaryInfoFromHeaderInfo(
subprocess.check_output([dump_syms, '-i', binary]).splitlines()[0])
+ if options.verbose:
+ with print_lock:
+ print "Done GetBinaryInfoFromHeaderInfo for %s: %s (%s)" % (binary, binary_info.name, binary_info.hash)
+
if not binary_info:
should_dump_syms = False
reason = "Could not obtain binary information."
2019-05-13 18:49:01 +00:00
@@ -296,8 +310,14 @@ def GenerateSymbols(options, binaries):
# See if there is a symbol file already found next to the binary
potential_symbol_files = glob.glob('%s.breakpad*' % binary)
for potential_symbol_file in potential_symbol_files:
+ if options.verbose:
+ with print_lock:
+ print "Looking at %s as a potential symbol file." % (potential_symbol_file)
with open(potential_symbol_file, 'rt') as f:
symbol_info = GetBinaryInfoFromHeaderInfo(f.readline())
+ if options.verbose:
+ with print_lock:
+ print "Got symbol_info for %s." % (potential_symbol_file)
if symbol_info == binary_info:
2019-05-13 18:49:01 +00:00
CreateSymbolDir(options, output_dir)
shutil.copyfile(potential_symbol_file, output_path)