Commit b16a2761 authored by sullivan's avatar sullivan Committed by Commit bot

Loosen the parsing of CDB output in windows; it can start with at least...

Loosen the parsing of CDB output in windows; it can start with at least 'ChildEBP' or 'Child-SP', and the extra output probably isn't much if those are not found.

BUG=433966

Review URL: https://codereview.chromium.org/904063002

Cr-Commit-Position: refs/heads/master@{#315069}
parent a3787296
...@@ -7,6 +7,7 @@ import heapq ...@@ -7,6 +7,7 @@ import heapq
import logging import logging
import os import os
import os.path import os.path
import re
import shutil import shutil
import subprocess as subprocess import subprocess as subprocess
import sys import sys
...@@ -262,7 +263,13 @@ class DesktopBrowserBackend(chrome_browser_backend.ChromeBrowserBackend): ...@@ -262,7 +263,13 @@ class DesktopBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
return None return None
output = subprocess.check_output([cdb, '-y', self._browser_directory, output = subprocess.check_output([cdb, '-y', self._browser_directory,
'-c', '.ecxr;k30;q', '-z', minidump]) '-c', '.ecxr;k30;q', '-z', minidump])
stack_start = output.find('ChildEBP') # cdb output can start the stack with "ChildEBP", "Child-SP", and possibly
# other things we haven't seen yet. If we can't find the start of the
# stack, include output from the beginning.
stack_start = 0
stack_start_match = re.search("^Child(?:EBP|-SP)", output, re.MULTILINE)
if stack_start_match:
stack_start = stack_start_match.start()
stack_end = output.find('quit:') stack_end = output.find('quit:')
return output[stack_start:stack_end] return output[stack_start:stack_end]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment