don't ignore dump_syms errors during symbol extraction
also fix the file filtering in case directories are passed for recursive
traversal (pdb files are not created in instdir, so that never really
matched our build-env)
Pass a directory to the invocation to make use of that filtering, and
also add a retry in case dump_syms segfaults during processing
(see also 73299faa75
)
Change-Id: I8989c3fd72de0b18eecce490fac81db956f87515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117386
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
parent
b5eb15a21d
commit
960b2878cb
2 changed files with 32 additions and 8 deletions
|
@ -430,7 +430,7 @@ symbols:
|
|||
rm -fr $(WORKDIR)/symbols/
|
||||
mkdir -p $(WORKDIR)/symbols/
|
||||
ifeq ($(OS),WNT)
|
||||
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/*
|
||||
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/
|
||||
$(SRCDIR)/bin/symstore.sh
|
||||
else
|
||||
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/*
|
||||
|
|
|
@ -452,12 +452,17 @@ class Dumper:
|
|||
if filename.startswith("cvs"):
|
||||
(ver, checkout, source_file, revision) = filename.split(":", 3)
|
||||
sourceFileStream += sourcepath + "*MYSERVER*" + source_file + '*' + revision + "\r\n"
|
||||
f.write("FILE %s %s\n" % (index, filename))
|
||||
f.write("FILE %s %s\r\n" % (index, filename))
|
||||
else:
|
||||
# pass through all other lines unchanged
|
||||
f.write(line)
|
||||
f.close()
|
||||
cmd.close()
|
||||
command_exit = cmd.close()
|
||||
if command_exit:
|
||||
if command_exit == 11:
|
||||
print >> sys.stderr, "INFO: dump_syms segfault while processing {}, retrying".format(file)
|
||||
return self.ProcessFile(file)
|
||||
raise Exception("ERROR - dump_syms error while processing {} (exit code {})".format(file, command_exit))
|
||||
# we output relative paths so callers can get a list of what
|
||||
# was generated
|
||||
print rel_path
|
||||
|
@ -468,6 +473,7 @@ class Dumper:
|
|||
result = self.SourceServerIndexing(debug_file, guid, sourceFileStream, cvs_root)
|
||||
result = True
|
||||
except StopIteration:
|
||||
print >> sys.stderr, "WARN: dump_syms - no debug info extracted for {}".format(file)
|
||||
pass
|
||||
except:
|
||||
print >> sys.stderr, "Unexpected error: ", sys.exc_info()[0]
|
||||
|
@ -483,11 +489,29 @@ class Dumper_Win32(Dumper):
|
|||
def ShouldProcess(self, file):
|
||||
"""This function will allow processing of pdb files that have dll
|
||||
or exe files with the same base name next to them."""
|
||||
if file.endswith(".pdb"):
|
||||
(path,ext) = os.path.splitext(file)
|
||||
if os.path.isfile(path + ".exe") or os.path.isfile(path + ".dll") or os.path.isfile(path + ".bin"):
|
||||
return True
|
||||
return False
|
||||
|
||||
skip_extensions = [
|
||||
".bat", ".class", ".config", ".css", ".glsl", ".hrc", ".ini", ".jar", ".mo", ".msu",
|
||||
".ods", ".png", ".py", ".pyc", ".rdb", ".rst", ".sh", ".svg", ".ttf", ".txt", ".xml",
|
||||
]
|
||||
(path,ext) = os.path.splitext(file)
|
||||
basename = os.path.basename(file)
|
||||
if ext in skip_extensions:
|
||||
return False
|
||||
elif os.path.getsize(file) == 21:
|
||||
# content is the "invalid - merged lib" stub
|
||||
return False
|
||||
elif basename.startswith("LICENSE") or basename.startswith("README"):
|
||||
return False
|
||||
elif basename == "msvcp140.dll" or basename == "vcruntime140.dll":
|
||||
return False
|
||||
elif basename.startswith("wininst-") or basename == "fetch_macholib" or basename == "command_template":
|
||||
# ignore python distutils stubs and scripts
|
||||
return False
|
||||
elif ext == "":
|
||||
print >> sys.stderr, "INFO: Skipping {}, has no extension".format(file)
|
||||
return False
|
||||
return True
|
||||
|
||||
def FixFilenameCase(self, file):
|
||||
"""Recent versions of Visual C++ put filenames into
|
||||
|
|
Loading…
Reference in a new issue