OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 | 8 |
9 import sys | 9 import sys |
10 import textwrap | 10 import textwrap |
11 from subprocess import Popen, PIPE | 11 from subprocess import Popen, PIPE |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 def _parse_report(line): | 87 def _parse_report(line): |
88 vaddr_hex, safety, code, ref_vaddr_hex = line.split() | 88 vaddr_hex, safety, code, ref_vaddr_hex = line.split() |
89 return (int(vaddr_hex, 16), int(safety), code, int(ref_vaddr_hex, 16)) | 89 return (int(vaddr_hex, 16), int(safety), code, int(ref_vaddr_hex, 16)) |
90 | 90 |
91 | 91 |
92 for line in sys.stdin: | 92 for line in sys.stdin: |
93 if line.startswith('ncval: '): | 93 if line.startswith('ncval: '): |
94 line = line[7:].strip() | 94 line = line[7:].strip() |
95 _explain_problem(sys.argv[1], *_parse_report(line)) | 95 _explain_problem(sys.argv[1], *_parse_report(line)) |
OLD | NEW |