Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: components/crash/content/tools/generate_breakpad_symbols.py

Issue 1880333002: Use is_valid_dump to check for valid dumps in telemetry exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable windows for testValidDump Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/core/stacktrace_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A tool to generate symbols for a binary suitable for breakpad. 6 """A tool to generate symbols for a binary suitable for breakpad.
7 7
8 Currently, the tool only supports Linux, Android, and Mac. Support for other 8 Currently, the tool only supports Linux, Android, and Mac. Support for other
9 platforms is planned. 9 platforms is planned.
10 """ 10 """
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 os.makedirs(path) 139 os.makedirs(path)
140 except OSError as e: 140 except OSError as e:
141 if e.errno == errno.EEXIST and os.path.isdir(path): 141 if e.errno == errno.EEXIST and os.path.isdir(path):
142 pass 142 pass
143 else: raise 143 else: raise
144 144
145 145
146 def GetBinaryInfoFromHeaderInfo(header_info): 146 def GetBinaryInfoFromHeaderInfo(header_info):
147 """Given a standard symbol header information line, returns BINARY_INFO.""" 147 """Given a standard symbol header information line, returns BINARY_INFO."""
148 # header info is of the form "MODULE $PLATFORM $ARCH $HASH $BINARY" 148 # header info is of the form "MODULE $PLATFORM $ARCH $HASH $BINARY"
149 info_split = header_info.strip().split(' ', 5) 149 info_split = header_info.strip().split(' ', 4)
150 if len(info_split) != 5 or info_split[0] != 'MODULE': 150 if len(info_split) != 5 or info_split[0] != 'MODULE':
151 return None 151 return None
152 return BINARY_INFO(*info_split[1:]) 152 return BINARY_INFO(*info_split[1:])
153 153
154 154
155 def GenerateSymbols(options, binaries): 155 def GenerateSymbols(options, binaries):
156 """Dumps the symbols of binary and places them in the given directory.""" 156 """Dumps the symbols of binary and places them in the given directory."""
157 157
158 queue = Queue.Queue() 158 queue = Queue.Queue()
159 print_lock = threading.Lock() 159 print_lock = threading.Lock()
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 binaries |= new_deps 288 binaries |= new_deps
289 queue.extend(list(new_deps)) 289 queue.extend(list(new_deps))
290 290
291 GenerateSymbols(options, binaries) 291 GenerateSymbols(options, binaries)
292 292
293 return 0 293 return 0
294 294
295 295
296 if '__main__' == __name__: 296 if '__main__' == __name__:
297 sys.exit(main()) 297 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/perf/core/stacktrace_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698