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

Side by Side Diff: tools/valgrind/asan/third_party/asan_symbolize.py

Issue 15715020: Bump the version of asan_symbolize.py 183006. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/valgrind/asan/third_party/README.chromium ('k') | no next file » | 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 #===- lib/asan/scripts/asan_symbolize.py -----------------------------------===# 2 #===- lib/asan/scripts/asan_symbolize.py -----------------------------------===#
3 # 3 #
4 # The LLVM Compiler Infrastructure 4 # The LLVM Compiler Infrastructure
5 # 5 #
6 # This file is distributed under the University of Illinois Open Source 6 # This file is distributed under the University of Illinois Open Source
7 # License. See LICENSE.TXT for details. 7 # License. See LICENSE.TXT for details.
8 # 8 #
9 #===------------------------------------------------------------------------===# 9 #===------------------------------------------------------------------------===#
10 import bisect 10 import bisect
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 def print_symbolized_lines(self, symbolized_lines): 321 def print_symbolized_lines(self, symbolized_lines):
322 if not symbolized_lines: 322 if not symbolized_lines:
323 print self.current_line 323 print self.current_line
324 else: 324 else:
325 for symbolized_frame in symbolized_lines: 325 for symbolized_frame in symbolized_lines:
326 print ' #' + str(self.frame_no) + ' ' + symbolized_frame.rstrip() 326 print ' #' + str(self.frame_no) + ' ' + symbolized_frame.rstrip()
327 self.frame_no += 1 327 self.frame_no += 1
328 328
329 def process_stdin(self): 329 def process_stdin(self):
330 self.frame_no = 0 330 self.frame_no = 0
331 for line in sys.stdin: 331 while True:
332 line = sys.stdin.readline()
333 if not line:
334 break
332 self.current_line = line.rstrip() 335 self.current_line = line.rstrip()
333 #0 0x7f6e35cf2e45 (/blah/foo.so+0x11fe45) 336 #0 0x7f6e35cf2e45 (/blah/foo.so+0x11fe45)
334 stack_trace_line_format = ( 337 stack_trace_line_format = (
335 '^( *#([0-9]+) *)(0x[0-9a-f]+) *\((.*)\+(0x[0-9a-f]+)\)') 338 '^( *#([0-9]+) *)(0x[0-9a-f]+) *\((.*)\+(0x[0-9a-f]+)\)')
336 match = re.match(stack_trace_line_format, line) 339 match = re.match(stack_trace_line_format, line)
337 if not match: 340 if not match:
338 print self.current_line 341 print self.current_line
339 continue 342 continue
340 if DEBUG: 343 if DEBUG:
341 print line 344 print line
(...skipping 11 matching lines...) Expand all
353 self.print_symbolized_lines(symbolized_line) 356 self.print_symbolized_lines(symbolized_line)
354 357
355 358
356 if __name__ == '__main__': 359 if __name__ == '__main__':
357 opts, args = getopt.getopt(sys.argv[1:], "d", ["demangle"]) 360 opts, args = getopt.getopt(sys.argv[1:], "d", ["demangle"])
358 for o, a in opts: 361 for o, a in opts:
359 if o in ("-d", "--demangle"): 362 if o in ("-d", "--demangle"):
360 demangle = True; 363 demangle = True;
361 loop = SymbolizationLoop() 364 loop = SymbolizationLoop()
362 loop.process_stdin() 365 loop.process_stdin()
OLDNEW
« no previous file with comments | « tools/valgrind/asan/third_party/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698