зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1621468 - Stop using `fix_stack_using_bpsyms.py` in `dmd.py`. r=gsvelto
This uses `fix-stacks`'s new Breakpad symbols support from https://github.com/mozilla/fix-stacks/pull/16. The patch also updates some comments in `dmd.py` to account for some very slight changes in `fix-stacks`'s output. Differential Revision: https://phabricator.services.mozilla.com/D66363 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
67e4cb66fe
Коммит
9a11249061
|
@ -217,10 +217,10 @@ def fixStackTraces(inputFilename, isZipped, opener):
|
|||
bpsyms = os.environ.get('BREAKPAD_SYMBOLS_PATH', None)
|
||||
sysname = platform.system()
|
||||
if bpsyms and os.path.exists(bpsyms):
|
||||
import fix_stack_using_bpsyms as fixModule
|
||||
import fix_stacks as fixModule
|
||||
|
||||
def fix(line):
|
||||
return fixModule.fixSymbols(line, bpsyms, jsonEscape=True)
|
||||
return fixModule.fixSymbols(line, jsonMode=True, breakpadSymsDir=bpsyms)
|
||||
|
||||
elif sysname in ('Linux', 'Darwin', 'Windows'):
|
||||
import fix_stacks as fixModule
|
||||
|
@ -345,10 +345,10 @@ def getDigestFromFile(args, inputFile):
|
|||
# `#02: TestFull(char const*, int, char const*, int) (../dmd/test/SmokeDMD.cpp:165)`
|
||||
#
|
||||
# Mac opt, with native stack fixing:
|
||||
# `#03: RunTests() (../build/tests/bin/SmokeDMD +0x21f9)`
|
||||
# `#03: RunTests() (../build/tests/bin/SmokeDMD + 0x21f9)`
|
||||
#
|
||||
# Windows opt, with native stack fixing failing due to a missing PDB:
|
||||
# `#04: ??? (..\\build\\tests\\bin\\SmokeDMD.exe +0x1c58)`
|
||||
# `#04: ??? (..\\build\\tests\\bin\\SmokeDMD.exe + 0x1c58)`
|
||||
#
|
||||
# If we see three such frames, we replace the entire stack trace
|
||||
# with a single, predictable frame. This imprecise matching will at
|
||||
|
|
|
@ -471,4 +471,4 @@ fix-stacks:
|
|||
fetch:
|
||||
type: git
|
||||
repo: https://github.com/mozilla/fix-stacks/
|
||||
revision: b0abef037e6fd46a2debce83c1a7612c6f35c599
|
||||
revision: 15304c4cf0bcd6e4feeadd065dba4af25c0d3e87
|
||||
|
|
|
@ -21,7 +21,7 @@ line_re = re.compile("#\d+: .+\[.+ \+0x[0-9A-Fa-f]+\]")
|
|||
fix_stacks = None
|
||||
|
||||
|
||||
def fixSymbols(line, jsonMode=False, slowWarning=False):
|
||||
def fixSymbols(line, jsonMode=False, slowWarning=False, breakpadSymsDir=None):
|
||||
global fix_stacks
|
||||
|
||||
result = line_re.search(line)
|
||||
|
@ -49,6 +49,15 @@ def fixSymbols(line, jsonMode=False, slowWarning=False):
|
|||
args = [fix_stacks_exe]
|
||||
if jsonMode:
|
||||
args.append('-j')
|
||||
if breakpadSymsDir:
|
||||
# `fileid` should be packaged next to `fix_stacks.py`.
|
||||
here = os.path.dirname(__file__)
|
||||
fileid_exe = os.path.join(here, 'fileid')
|
||||
if platform.system() == 'Windows':
|
||||
fileid_exe = fileid_exe + '.exe'
|
||||
|
||||
args.append('-b')
|
||||
args.append(breakpadSymsDir + "," + fileid_exe)
|
||||
|
||||
fix_stacks = Popen(args, stdin=PIPE, stdout=PIPE, stderr=None)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче